Forum Discussion
Dynamic query with next page key parameter from API - How to adapt code for Power BI service?
- 1 year ago
In the end, I solved my problem using a python script to import the data and write them in excel files.
Kind regards
Marta
Don't use external functions. Try not to use recursions. Remember that your browser is caching results, so you can first create a list of the nextPageKey values and then fetch the actual data from the cache.
Thank you for the suggestions but your proposed solution is not clear to me. How can I get the list of nextPagekey values in advance?
Alternatively, can I implement the extraction logic with a Power BI service dataflow or with Power Automate? So as to avoid the error on the dynamic datasource on the Service?
thank you
Kind regards
- lbendlin1 year agoSuper User
When you request results you get two things back - the data and the pointer to the next page.
In the first iteration ignore the data and only harvest the next page links into a list.
In the second iteration retrieve the data from the list of URLs. This assumes that the first iteration is cached in your web engine.