pythonazureazure-table-storageazure-tablequery

Azure Table Storage Querying using Python- Read Integer Column


I am trying to query Azure Table Storage using Python. An int32 datatype column doesn't return its value but returns something like this azure.storage.table.models.EntityProperty obj..... But, in case of string datatype columns, i am not facing any such issues. Could someone please help me ?

The column Pos in below script is an integer column in the table

queryfilter = "startDateTime gt datetime'%s' and temp eq '%s'" % (datefilter, temp)

task = table_service.query_entities(azureTable, filter=queryfilter)

for t in task: 
   print(t.Pos)

Solution

  • Looking at the documentation here: https://learn.microsoft.com/en-us/python/api/azure.cosmosdb.table.models.entityproperty?view=azure-python, can you try the following?

    for t in task: print(t.Pos.value)