Forum Discussion
Cannot set scheduled refresh for odata with parameter in URL
- 3 years ago
Have you already read this article?
Otherwise, you can switch to Web.Contents with RelativePath/Query and create a function to handle the xml extraction.
Pat
Please familiarize yourself with the second parameter.
OData.Feed - PowerQuery M | Microsoft Learn
Especially the Query part. It will allow you to have a static base URL, and will most likely make the scheduled refresh work.
Thank you for the reply!
I took a look at your link and changed my code. (Sorry for the capture since I wasn't able to copy and paste.)
But it returned an error.
I found the following link, saying that
"in order to append system query options to the URi used into OData.Feed , you must append them directly to the main URi. Or you can use Web.Contents which accepts system query options into the 'Query=[...]' clause."
OData-Feed-command-with-query-and-options-no-working
So I also tried to use the Odata query in a way shown in the following example, but a "bad request" error returned, so I guess my data source does not support this format.
let
Source = OData.Feed(
"https://services.odata.org/TripPinRESTierService/People?$filter=FirstName eq @f",
null,
[
Implementation = "2.0",
Query = [#"@f" = "'Scott'"]
]
)
in
SourceBased on this, I think the only way I can go now is to use the web.contents, although my code will be much more complecated since I need to expand the XML file...
Do you have any suggestions or comments?
Best regards,
Lei
- ppm13 years agoSolution Sage
Have you already read this article?
Otherwise, you can switch to Web.Contents with RelativePath/Query and create a function to handle the xml extraction.
Pat
- jinlei199063 years agoFrequent Visitor
Thank you for the advice. I tried the way in the link but I think my odata version does not support the use of parameter alias. I solved this by using the web contents instead.