Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm trying to get the JSON from Python as Source in the Query Editor:
let Source = Python.Execute("import urllib.request, json #(lf)with urllib.request.urlopen(""https://api.pipedrive.com/v1/organizations?start=0&limit=50&api_token=MyVerySecretGUID"") as url:#(lf) data = json.loads(url.read().decode())#(lf) print(data)"), data = Source, #"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "name"}, {"Column1.id", "Column1.name"}) in #"Expanded Column1"
Tried different variations without the converting to table steps. But the Source step does not even returns the respronse.
Which format does Power BI want to be delivered? Tried print, clean JSON everything even to get the child items out of the JSON nothing works...
The Python code returns the JSON directly:
import urllib.request, json with urllib.request.urlopen("https://api.pipedrive.com/v1/organizations?start=0&limit=50&api_token=MyVerySecretGUID") as url: data = json.loads(url.read().decode()) print(data)
p.s. yes I know I can get the JSON directly as source, but I want to loop trough all records provided and no user actions needs to be involved(like the Parameters/Invoked function). That's why im trying to do it via Python.
Am I doing something wrong here?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |