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

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.

Reply
Quentin
Helper III
Helper III

Web datasource dynamically connected

Hello everyone, 

 

I have a tricky question. 
I am importing a table containing url of Web datasource (size of the table will change through time) but datasource are identically structured.
I want to be able to ask PowerQuery to connect to each of these datasource and append the data.

I have the following situation for example:

Quentin_1-1594122395398.png

 

These are URL to connect to results to 8 different surveys based on the same structure (coming from the same template). But in the future it can be 15 or 160.
I want to ask PowerQuery to connect as Web datasource to each of them and append results.

I hope i have been clear enough, i think it could be done via Advanced Editor but i'm not so familiar with it...
Thanks for your appreciated feedbacks!

1 ACCEPTED SOLUTION
Smauro
Solution Sage
Solution Sage

Trying to escape the editor:

Select [url] and got to Transform, select anything --e.g. Parse->Uppercase, replace Text.Upper, type text with
(x) => Csv.Document(Web.Contents(x))
if it's giving you a csv, or
(x) => Json.Document(Web.Contents(x))
if it's giving you a json.

If the transformation is more complicated, I'd advice you to take one url, create a new query connecting to it and bringing the table on a primal step, then go to advanced editor and change it as:
(t) => let ...
and change what's inside Web.Contents with t, e.g. Web.Contents("https/api/v1/data/77") to Web.Contents(t)
Now name this query anything, e.g. TransformApi
then, like previously, change Text.Upper, type text to TransformApi

 

 

Cheers




Feel free to connect with me:
LinkedIn

View solution in original post

2 REPLIES 2
Smauro
Solution Sage
Solution Sage

Trying to escape the editor:

Select [url] and got to Transform, select anything --e.g. Parse->Uppercase, replace Text.Upper, type text with
(x) => Csv.Document(Web.Contents(x))
if it's giving you a csv, or
(x) => Json.Document(Web.Contents(x))
if it's giving you a json.

If the transformation is more complicated, I'd advice you to take one url, create a new query connecting to it and bringing the table on a primal step, then go to advanced editor and change it as:
(t) => let ...
and change what's inside Web.Contents with t, e.g. Web.Contents("https/api/v1/data/77") to Web.Contents(t)
Now name this query anything, e.g. TransformApi
then, like previously, change Text.Upper, type text to TransformApi

 

 

Cheers




Feel free to connect with me:
LinkedIn

Hello @Smauro,

Thank you very much for your answer. I tried the first option and it worked magically.
I say magically because i don't understand it, but it works!

Well done and thanks for the efficiency y quick answer!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors