Forum Discussion
Airtable Integration - Duplicating Infinite Rows
- Anonymous3 years ago
Hello guys i have the solution copy past this code
let
Pagination = List.Skip( List.Generate( () => [Page_Key = "init", Counter=0], // Start Value
each [Page_Key] <> null, // Condition under which the next execution will happen
each [Page_Key = try if [Counter]<1
then ""
else [WebCall][Value][offset]
otherwise null, // determine the LastKey for the next execution
WebCall = try if [Counter]<1
then Json.Document(Web.Contents("https://api.airtable.com/v0/"&BASE_ID&"/"&TABLE_ID,[Headers=[Authorization="Bearer "&PERSONAL_ACCESS_TOKEN]]))
else Json.Document(Web.Contents("https://api.airtable.com/v0/"&BASE_ID&"/"&TABLE_ID&"?offset="&[WebCall][Value][offset] , [Headers=[Authorization="Bearer "&PERSONAL_ACCESS_TOKEN
]])),// retrieve results per call
Counter = [Counter]+1// internal counter
],
each [WebCall]
),
1
),
#"Json2Table" = Table.RenameColumns(Table.FromList(Pagination, Splitter.SplitByNothing(), null, null, ExtraValues.Ignore),{{"Column1", "stepA.1"}}),
#"stepA.1 développé" = Table.ExpandRecordColumn(Json2Table, "stepA.1", {"Value"}, {"Value"})
in
#"stepA.1 développé"
Hello guys i have the solution copy past this code
let
Pagination = List.Skip( List.Generate( () => [Page_Key = "init", Counter=0], // Start Value
each [Page_Key] <> null, // Condition under which the next execution will happen
each [Page_Key = try if [Counter]<1
then ""
else [WebCall][Value][offset]
otherwise null, // determine the LastKey for the next execution
WebCall = try if [Counter]<1
then Json.Document(Web.Contents("https://api.airtable.com/v0/"&BASE_ID&"/"&TABLE_ID,[Headers=[Authorization="Bearer "&PERSONAL_ACCESS_TOKEN]]))
else Json.Document(Web.Contents("https://api.airtable.com/v0/"&BASE_ID&"/"&TABLE_ID&"?offset="&[WebCall][Value][offset] , [Headers=[Authorization="Bearer "&PERSONAL_ACCESS_TOKEN
]])),// retrieve results per call
Counter = [Counter]+1// internal counter
],
each [WebCall]
),
1
),
#"Json2Table" = Table.RenameColumns(Table.FromList(Pagination, Splitter.SplitByNothing(), null, null, ExtraValues.Ignore),{{"Column1", "stepA.1"}}),
#"stepA.1 développé" = Table.ExpandRecordColumn(Json2Table, "stepA.1", {"Value"}, {"Value"})
in
#"stepA.1 développé"
- dbremer3 years agoFrequent Visitor
Hey Urba34,
I tried this code, but it did not load my data into PowerBI. Did you include everything?
- Anonymous3 years agoNot applicable
Yes
BASE_ID
TABLE_ID
PERSONAL_ACCESS_TOKEN
it's a parameters in Power BI like that
- dbremer3 years agoFrequent Visitor
Unfortunately, it's not pulling any data for me.