Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Load JSON as source via Python

I'm trying to get the JSON from Python as Source in the Query Editor:


    Source = Python.Execute("import urllib.request, json #(lf)with urllib.request.urlopen("""") as url:#(lf)    data = json.loads(    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"}, {"", ""})
    #"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("") as url:
    data = json.loads(


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?



@Laho - thanks for sharing, I'll give it a try!

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!


Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors