Hi, I need some guidelines on preparing power BI (PBIX) file to plug into CD pipelines. Have a few questions. Hopefully someone can help to guide.
What’s the prefer way to set connection string? In our case, source database = SQL. Saw MSFT blog post to use parameters for this. If not parameters, any alternative ?
what’s the best way to empty out dataset (data import) PBIX before checking into source control? This way, the CD script will deploy the (small file) PBIX to correct workspace and perform full data refresh after setting connection string property/parameters.
#1: I don’t think you can do this automatically, but is inherent in the PBIX when deploying (I’d be happy if someone else has other experience); #2: you can save the file as a template (PBIT) which removes all data. AFAIK, one needs to create a new PBIX from this template and as part of this manual process one sets the connection strings, so not sure how it would work with existing CD pipelines. If you have premium capacity (which I don’t), there is now a preview feature in the Power BI Service for deployment pipelines that may help.
Greg
Hi Greg:
Finally, viewed the youtube and the blogpost. Currently we are using A-SKU instead of P-SKU. We are leveraging Azure DevOps for our CICD pipelines. I have a couple workarounds to automate this. But not the best.
Leverage parameters to set my DB connection string in PBIX file : ServerName & DatabaseName
save the PBIX with ‘empty’ tables. – create a empty SQL db without any data.
Check PBIX file into Azure DevOps
CD pipelines will
i) push PBIX file to a pre-defined workspace
ii) Update Parameters to set DB connection string via Power BI API
iii) Trigger 1st data refresh via Power BI API