Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
musicbydannyd
Advocate IV
Advocate IV

JSON from URL in Table Column?

I have simple 2 column table with an ID and URL. Basic structure of URL parts are:

JSON_Column.png

Pasting one of the URLs into web browser does show data formatted as JSON and I can view the record(s) when creating a new query using Json.Document(Web.Contents("url")).

 

What I'm HOPING to acomplish is convert URL column to list of JSON record(s) associated with each ID. I've tried various combinations of column transfomations (Json.Document, Web.Contents, List.Transform, etc.), but am getting the dreaded "Formula.Firewall" error.

 

I know it's doable, but apparently my brain is still in quarantine.

 

TIA, Danny

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @musicbydannyd ,

 

Define a variable and then invoke custom function.

M code may like this:

(id as number) as table=>
let
    Source = Table.FromRecords(Json.Document(Web.Contents("https://xxxxxxxx" &Number.ToText(id)&"xxxx"))[subjects])
in
    Source

test_JSON from URL in Table Column..PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @musicbydannyd ,

 

Define a variable and then invoke custom function.

M code may like this:

(id as number) as table=>
let
    Source = Table.FromRecords(Json.Document(Web.Contents("https://xxxxxxxx" &Number.ToText(id)&"xxxx"))[subjects])
in
    Source

test_JSON from URL in Table Column..PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Liang,

Please provide more context/explaination around your solution.
I'm not understanding your answer.

-S

@V-lianl-msft, unfortunately, I had to put this project on hold for a while. During my last attempt, I WAS able to successfully create a formula as you described, however was still getting the "Formula.Firewall" error when invoking. Thanks, Danny

@V-lianl-msft, I was afraid there might be a custom function involved for this rookie... appreciate the example! 😁

 

Let me do a little more research and I'll report back with a solution or more help.

 

Thanks again all!

DannyD

lbendlin
Super User
Super User

Obviously this depends on the format of the actual JSON behind the URLs but you should just be able to expand the records that are returned from each Json.Document(Web.Contents(JSON))

 

Maybe the column name JSON throws Power Query off?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.