Forum Discussion
how to create a query that paginates?
Hi!
Total coding newbie here trying to get more than 1000 entries from XML Tables in Azure Table Storage using Web API and a Shared Access Key.
What I've learned so far:
- I can use the continuation tokens in HTTP response headers in the URL/URI to get to the next set of 1000. From what I can tell (in my limited abilities)
- PBI doesn't show me the headers anywhere in the GUI (?)
What I guess I need:
- A way to get my query to read the HTTP response headers
- Parse out the "NextPartitionKey" and "NextRowKey"
- Insert the keys in the next request
- Understand how to loop the above and implement in a way that hopefully works in PBI Service...
(Then of course I have like 30 transformations to get the data into the shape I need it to present it to the users...)
Many thanks for any help!
- PerK7 years agoFrequent Visitor
Quick follow-up:
Got some of the headers through:
let Källa = Value.Metadata(Web.Contents("https://[account].table.core.windows.net/[tablename]?st=2018-11-08T12%3A41%3A00Z&se=2018-12-10T12%3A41%3A00Z&sp=r&sv=2017-04-17&tn=history0debug&sig=[Shared Access Key]")) as record, #"Konverterad till tabell" = Record.ToTable(Källa) in KällaWhich gives me:
Navigating to the "Headers" record only gives me "application/atom+xml;type=feed;charset=utf-8" but not the continuation tokens needed.
- ImkeF7 years ago
Community Champion
Have no experience with that API, so no help on this one unfortunately.
- PerK7 years agoFrequent Visitor
No worries.
I got access to a secondary key and could access the Table Storage through the "normal" API instead, and, from what I can tell, now I get all the entities I query for, without pagination.
Cheers!