0

I am trying to get the first(oldest) n rows of data from a table in Azure Table Storage - but am unable to find any documentation that allows doing so via Python. I use an integer-based hash value as my PartitionKey and by default, the table is sorted by PartitionKey. However, I need to fetch the oldest n rows. Is there any way or feasible hack I can use to do this?

1
  • Nope, it would count as a new row - but if that's the only way to get it done then I'm willing to compromise Commented Nov 10, 2020 at 3:05

1 Answer 1

1

Unfortunately there is no solution. Server side sorting is not supported in table storage. If you want to sort by timestamp, you have to set the PartitionKey's value to the timestamp, and then the query result will be sorted by timestamp in the reverse order.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.