使用Python读取整数列的Azure表存储查询

问题描述 投票:0回答:1

我试图使用Python查询Azure表存储。 int32数据类型列不返回其值,但返回类似于azure.storage.table.models.EntityProperty obj .....但是,在字符串数据类型列的情况下,我没有遇到任何此类问题。有人可以帮帮我吗?

下面脚本中的列Pos是表中的整数列

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)
python azure azure-table-storage azure-tablequery
1个回答
1
投票

看看这里的文档:https://docs.microsoft.com/en-us/python/api/azure.cosmosdb.table.models.entityproperty?view=azure-python,你能尝试以下方法吗?

for t in task: print(t.Pos.value)
© www.soinside.com 2019 - 2024. All rights reserved.