Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

get_entity returns some values as a memory location #20

Open
houranii opened this issue Feb 14, 2018 · 1 comment
Open

get_entity returns some values as a memory location #20

houranii opened this issue Feb 14, 2018 · 1 comment

Comments

@houranii
Copy link

I am trying to retrieve records from Azure Storage Table, I run this
query_items = table_service.get_entity(table_name = table_name, partition_key = i[0], row_key=i[1], select='StatusCode', accept='application/json;odata=nometadata')

The value for query_items is
{'etag': None, u'StatusCode': <azure.cosmosdb.table.models.EntityProperty object at 0x7f3485b34650>}

I checked the code here and there's no getter for the object to retrieve its value.
https://docs.microsoft.com/en-us/python/api/azure.cosmosdb.table.models.entityproperty?view=azure-python

Unlike .net SDK
https://docs.microsoft.com/en-us/dotnet/api/microsoft.windowsazure.storage.table.entityproperty.int64value?view=azure-dotnet#Microsoft_WindowsAzure_Storage_Table_EntityProperty_Int64Value

I wonder if anyone knows a way around this?

@ausfeldt
Copy link
Contributor

I believe the equivalent would be entity.StatusCode.value given
entity = Entity()
entity.StatusCode = EntityProperty(EdmType.INT64, 200)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants