Forum Discussion
pezwi
6 years agoFrequent Visitor
Only select certain columns from source
Hi, I am new to power query and I'm trying to figure out how I can limit the data that I'm extracting from the source because I only need a couple of the columns. For example, I'm running a web que...
Greg_Deckler
Community Champion
6 years agopezwi - Well, if this was a SQL source you could use a View or write a SQL statement but since it is a Web API you are going to be limited to the functionality of that Web API. For example, I believe ODATA allows you to specify columns/fields but not sure about just any old Web API.
pezwi
6 years agoFrequent Visitor
I'll have to look into the Odata option. I'm not finding a lot of examples for that.
Currently I'm pulling the data into a list which is capturing all the records. It would be great if I could do loop through the records but I'm having trouble figuring that out.
Source = List.Generate(
() => getPage(""),
each _[scrollToken] <> null,
each getPage(_[scrollToken]),
each [scrollToken = _[scrollToken], records = _[records]]
),