Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Im fairly new in Power bi. I worked through lot of different sugestions how to et data in from painated api, but i still can't figure it out what is the problem.
Here is code to get next page.
let
Source = Json.Document(Web.Contents("https://xxxxxxxxxxxx?page[size]=2000&page[number]=1", [Headers=[Authorization="Bearer "&Gettoken()]])),
links = Source[links],
next = links[next]
in
next
Here is code to get data from 10 pages.
let
iterations = 10, // Number of iterations
url = "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
FnGetOnePage =
(url) as record =>
let
Source = Json.Document(Web.Contents(url),[Headers=[Authorization="Bearer "&Gettoken()]]),
data = try Source[data] otherwise null,
next = try Source[links] [next] otherwise null,
res = [Data=data, Next=next]
in
res,
GeneratedList =
List.Generate(
()=>[i=0, res = FnGetOnePage(url)],
each [i]<iterations and [res][Data]<>null,
each [i=[i]+1, res = FnGetOnePage([res][Next])],
each [res][Data])
in
GeneratedList
Can someone point me into right direction. Thank you for advance 🙂
Solved! Go to Solution.
Hello again,
I found working logic from here: https://stackoverflow.com/questions/73832274/power-query-pagination
Hello again,
I found working logic from here: https://stackoverflow.com/questions/73832274/power-query-pagination
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |