Varun Gupta
Varun Gupta

Reputation: 1457

Azure Table Storage returns Next Partition Key and Next Row Key for top < 1000

I am querying Azure Table Storage with $top=100. Here, I am able to retrieve all 100 rows in the first call itself then also Azure Storage Explorer is generating continuation token. I am not sure why this type of behavior is happening?

Upvotes: 3

Views: 1592

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136334

This is expected behavior. By providing continuation token the table service is letting you know that there are more entities available and should you decide to fetch those entities, you would need to use this continuation token. From the REST API documentation:

A query against the Table service may return a maximum of 1,000 items at one time and may execute for a maximum of five seconds. If the result set contains more than 1,000 items, if the query did not complete within five seconds, or if the query crosses the partition boundary, the response includes headers which provide the developer with continuation tokens to use in order to resume the query at the next item in the result set. Continuation token headers may be returned for a Query Tables operation or a Query Entities operation.

Note that the total time allotted to the request for scheduling and processing the query is 30 seconds, including the five seconds for query execution.

It is possible for a query to return no results but to still return a continuation header.

Upvotes: 5

Related Questions