Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48116

Re: Import single PBIX to multiple workspace/datasets using different Azure SQL server hostnames

$
0
0

Opened a ticket with Microsoft and figured out the issue. Answering my own questions below in case anyone else has the same issue.

 

> 1) Is there a way to change the query parameter (which contains the SQL server hostname) either during import PBIX via command-line or when embedding it on to a webpage?

 

No. But don't have to because:

 

> 2) It is even possible to change the SQL server hostname used by all the tables in a PBIX file via REST API (i.e. without using PowerBI Desktop)?

 

Yes. This is possible via powerbi update-connection script (API Post SetAllConnections). And it works well as long as certain conditions are met.

 

3) If I have 100 customers and each of them needs the exact same PBIX but pointing to their own SQL server, do I need 100 copies of the PBIX file with the query parameter set to each customer's SQL server? This seems insane to maintain but after hours of searching online, I'm beginning to feel there is no alternative.

 

Thankfully, don't have to maintain 100 PBIX files. Can successfully deploy the same PBIX to any number of hosts. And it works well as long as certain conditions are met.

 

NECESSARY CONDITIONS for deploying the same PBIX to different workspaces that connect to different servers: Tables used in the PBIX must have the exact same structure in all the databases/SQL servers. Structure of tables not used in PBIX does not matter.

 

If the table structure is different, it is still possible to deploy same PBIX if you create a custom SELECT statement with only the common fields. E.g.:

 

let Source = Sql.Database(SQL_Host, SQL_DB, [Query="SELECT Field1, Field2 FROM Table"]) in Source


Viewing all articles
Browse latest Browse all 48116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>