I am querying an Azure Data Table using Python:
# create azure table storage client
table_client = TableClient.from_connection_string(conn_str=key1, table_name="Table")
# query table
entities = table_client.query_entities(f"Timestamp ge datetime'{start_date}' and Timestamp le datetime'{end_date}'")
entity_list = []
for entity in entities:
entity_list.append(entity)
Everything works as expected, except my result does not contain the Timestamp field.
How am I able to include the Timestamp in the query result?
2
Answers
For anyone coming back to this question in the future, a solution is to fetch the timestamp from the entity metadata:
Looking at the SDK source code
here
, it looks the SDK is not including theTimestamp
property in the resulting entity. The code is setting thePartitionKey
(line 168) andRowKey
(line 173) properties but not theTimestamp
property.I believe your best bet would be to raise an issue here: https://github.com/Azure/azure-sdk-for-python/issues and ask the team to include this property in the resulting entity.