Forum Discussion
loop through sources
- 9 years ago
It's all about getting third party data via API's
If I got your idea correctly, you could store the parameters in one column and call the API row by row. Check a simple demo below. You could check the returned json by clicking Moscow weather json.
let Source = Table.FromRecords({ [city= "Moscow",cid=524901], [city= "Paris",cid=2988507], [city= "London",cid=2643743]}), #"Changed Type" = Table.TransformColumnTypes(Source,{{"cid", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "responseJson", each Json.Document(Web.Contents("http://api.openweathermap.org/data/2.5/forecast/city?id="&[cid]&"&APPID=76acd9a867adb4cd9120298d16b3655f"))) in #"Added Custom"
hi Mcburn,
It's all about getting third party data via API's
Thanks!
Anton
It's all about getting third party data via API's
If I got your idea correctly, you could store the parameters in one column and call the API row by row. Check a simple demo below. You could check the returned json by clicking Moscow weather json.
let
Source = Table.FromRecords({
[city= "Moscow",cid=524901],
[city= "Paris",cid=2988507],
[city= "London",cid=2643743]}),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"cid", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "responseJson", each Json.Document(Web.Contents("http://api.openweathermap.org/data/2.5/forecast/city?id="&[cid]&"&APPID=76acd9a867adb4cd9120298d16b3655f")))
in
#"Added Custom"- antonb9 years agoFrequent Visitor
thanks.. that helped a lot!
I now have a query that starts with the projects. Than within the same query a extra column is added with the JSON request (with a variable of the projectsID).