Home > Enterprise >  Timestamp not Appearing in Azure Table Storage Query Result Entities in Python
Timestamp not Appearing in Azure Table Storage Query Result Entities in Python

Time:07-07

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}'")

for entity in entities:
    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?

CodePudding user response:

Looking at the SDK source code here, it looks the SDK is not including the Timestamp property in the resulting entity. The code is setting the PartitionKey (line 168) and RowKey (line 173) properties but not the Timestamp 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.

  • Related