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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
WorkWithCode
Frequent Visitor

Web-Api stops my dataset from refreshing

Hi all,

 

In powerquery i'm using a web-api function that can pinpoint a employees location. Only because of this function my dataset won't refresh. the error message I get is this: Query contains unsupported function. Function name: Web.Contents.

 

So after a little research I found that you can use the skip connection button but, even when that option turned on it still doesn't work. does anyone have the same problem?

 

This is the function is use:

= (location) =>

let
Bron = Xml.Tables(Web.Contents("http://dev.virtualearth.net/REST/v1/Locations/"&location&"?o=xml&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...")),
#"Type gewijzigd" = Table.TransformColumnTypes(Bron,{{"Copyright", type text}, {"BrandLogoUri", type text}, {"StatusCode", Int64.Type}, {"StatusDescription", type text}, {"AuthenticationResultCode", type text}, {"TraceId", type text}}),
ResourceSets = #"Type gewijzigd"{0}[ResourceSets],
ResourceSet = ResourceSets{0}[ResourceSet],
#"Type gewijzigd1" = Table.TransformColumnTypes(ResourceSet,{{"EstimatedTotal", Int64.Type}}),
Resources = #"Type gewijzigd1"{0}[Resources],
Location = Resources{0}[Location],
#"Type gewijzigd2" = Table.TransformColumnTypes(Location,{{"Name", type text}, {"EntityType", type text}, {"Confidence", type text}, {"MatchCode", type text}}),
Address = #"Type gewijzigd2"{0}[Address]
in
Address

1 REPLY 1
blopez11
Resident Rockstar
Resident Rockstar

There has been alot written about this in the community

You likely will need to break up the first parameter you are passing to webcontents to where the first paramter is just the base url, then use a combination of the relative path, query and header options to pass in the rest of your url

 

There are alot of articles on this that you can find searching the web, but I've included one below that I used:

https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-i...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors