Latest Enterprise DNA Initiatives

CD (continuous deployment) best practices for power bi report

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.

  1. 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 ?
  2. 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.

Any comments greatly appreciated.

#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.

Thanks Greg, thanks for prompt reply. I definitely will check these out. :slight_smile:

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.

  1. Leverage parameters to set my DB connection string in PBIX file : ServerName & DatabaseName
  2. save the PBIX with ‘empty’ tables. – create a empty SQL db without any data.
  3. Check PBIX file into Azure DevOps
  4. 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

welcome comments/suggestions


Hi @akiko_lim. Sounds like a reasonable method/starting point to me, but only a trial will let you see how it works for you.

I’ll leave it to others to comment further, as I don’t have first-hand experience with either Azure DevOps or Premium capacity. Anyone?