Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48064

Re: loop through sources

$
0
0

 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.

 

Capture.PNG

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"

Viewing all articles
Browse latest Browse all 48064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>