Forum Discussion
Dataset contains a dynamic data source
- 1 year ago
Hi Anonymous ,
Thank you for the update.This error usually happens when you connect to a data source using a dynamically generated url.
Power BI blocks combining data from different sources with incompatible privacy levels for security reasons. When you dynamically construct a URL, Power BI cannot determine the privacy level of the resulting full URL, and it defaults to treating it as a combined source. If the root/base URL is set to a different privacy level than the dynamic part (e.g., parameter or other data source), it triggers a “Formula.Firewall” error or credential error.
Closing this dialog and going back to the Query Editor, if you click the Edit Credentials button, you can set credentials for the data source (anonymous access is fine in this case). For more information, please refer to: Chris Webb's BI Blog: Credentials, Data Privacy Settings And Data Sources In Power Query/Power BI
Please refer to these articles, might hold some useful tips:
http://blog.datainspirations.com/2018/02/17/dynamic-web-contents-and-power-bi-refresh-errors/
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra E.
lbendlin
In some cases there is no sql database, then I leave the database and servername empty. I would expect the retrieval to fail and want the query to deliver an empty table.
Okay, how would you do that if I do not have a server and databasename in the cases I would expect an empty table?
An alternative I see is using a boolean so that query 1 would look like:
if Boolean_Datebase then
let
Source = try MySQL.Database(ServerName, DatabaseName, [ReturnSingleDatabase=true]) otherwise
Table.TransformColumnTypes(#table( {""}, {} ), )
forecast = Source{[Schema=DatabaseName,Item="forecast"]}[Data]
in
forecast
else
let
EmptyTable = Table.TransformColumnTypes(#table( {""}, {} ), )
in EmptyTable
but I then still receive the same error
- lbendlin1 year agoSuper User
You must always specify a fixed server and database name in the original source query, no matter if you plan to use it or not. You can then swap out the database name (assuming you have access to both databases) for your query. You can also get creative and use a linked server in your query etc. But the initial names must be static.
- Anonymous1 year agoNot applicable
There is only 1 database. So in the first case I would like to retrieve the data belonging to this database with a certain databasename and databaseserver. In the second case, there is no database, I would like to retrieve an empty table.
Currently, I try to retrieve the data/empty table in query 1 and disabled load. In query 2, I continue with the result from query 1 and do load this one; this gives the dynamic data source error.