Forum Discussion
Workaround powerbi.com Requirement for Static URL in Web.Contents() Function
Hi PetrusJKruger,
What's the web data source? Can you create a view in the database? Then you can use the simple query like this: "SELECT name FROM VIEW".
Best Regards,
Dale
Hi v-jiascu-msft,
Thanks for coming back to me.
The websource is a OrientDB managed database, which allows access through a RESTful HTTP protocol.
I'm unfortunately not familiar with what you mean by 'view' of the database - I'm very much learning as I go along. Perhaps I'm not answering your question, but I'll attempt to.
I suspect that
http://<server>:[<port>]/query/<database>/<language>/<query-text>[/<limit>]
is how you access the 'view'. Because it is an HTTP request the URL needs to be encoded from
"SELECT name FROM VIEW" to "SELECT%20name%20FROM%20VIEW"
I can work around that manually without the Uri.EscapeDataString() function. However, now I need to add a WHERE clause that changes dynamically and still use no functions like Date.ToText(max_historic_date). Then I need to append that to become part of the <query-text>, hoping that using & to concatenate will still allow powerbi.com to perform its static web source test.
I hope that helps, v-jiascu-msft.
Kind regards,