Forum Discussion
Dich123
2 years agoFrequent Visitor
Limit 1000 rows in powerquery from SuccessFactors API
Hello, I am trying to pull the data from SF via the web connector using the API " https://api55.sapsf.eu/odata/v2/User?$format=JSON". I am redirected directly to power query, however I have only 10...
- 2 years ago
You will need to spend time to go through the documentation and understand what it does. Here is an example that does exactly what you need. TripPin 5 - Paging - Power Query | Microsoft Learn
lbendlin
2 years agoSuper User
Handling paging for Power Query connectors - Power Query | Microsoft Learn
Please do not show your access token on the interwebs
- Dich1232 years agoFrequent Visitor
lbendlin thank you very much for your reply and for the advice.
I came up with this solution but i still have just 1000 rows.
Please note that i don't know the M code.let pageSize = 10000, pageNumber = 1, skipValue = (pageNumber - 1) * pageSize, url = https://api55.sapsf.eu/odata/v2/User?$format=JSON&$top= & Text.From(pageSize) & "&$skip=" & Text.From(skipValue), Source = Json.Document(Web.Contents(url, [Headers=[Authorization=" Basic QJJDGMMDHCGJKBJTlRAYWJkdWxsYWhhYjpTDE5ODk= // Your existing transformations... #"Converted to Table" = Table.FromRecords({Source}), #"Expanded d" = Table.ExpandRecordColumn(#"Converted to Table", "d", {"results", "__next"}, {"d.results", "d.__next"}), #"Expanded d.results" = Table.ExpandListColumn(#"Expanded d", "d.results"), … till the end of the code- lbendlin2 years agoSuper User
You will need to spend time to go through the documentation and understand what it does. Here is an example that does exactly what you need. TripPin 5 - Paging - Power Query | Microsoft Learn