Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
gbc40
New Member

Power Bi deployment pipeline with Azure Devops and Snowflake

Hi, 

 

I am trying to setup Power BI CICD in Azure DevOps. I am using Power BI Action to publish report and update datasource connection.

 

I have seen that there is already a great post regarding this topic : https://community.fabric.microsoft.com/t5/Community-Blog/PowerBI-CICD-using-Azure-DevOps/ba-p/769244...

However, this post proposes to use a powershell script or Power BI action extension with Odata in regards to data source update. 

I would like to know how I can update the data source when using snowflake as part of the CICD in Azure Devops with the Power BI actions extension. 

Here is the a screenshot of the options I have : 

gbc40_0-1712051134405.png
I would like to know what I should select to update Datasource connection when using snowflake ? 

 

 


My goal is to create a pipeline to deploy Power BI  reports from UAT to Prod where reports and datasets in the UAT workspace have to point only to UAT databases and reports and datasets in the PROD workspace have to point only to UAT databases. 
In Power BI Service, I know that I can use a rule to update a parameter but it is a very manual and time consuming to apply this parameter to all reports. Also, I would like to ensure that Row Level Security remains during that process. 

Here is my current pipeline. Is this the right approach ?



trigger
:
- master

pool:
vmImage: 'windows-latest'

steps:
- task: CopyFiles@2
displayName: 'Copy Files to: Staging Artifact'
inputs:
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'

- task: PowerBIActions@5
inputs:
PowerBIServiceEndpoint: 'pbi-spn'
Action: 'Publish'
WorkspaceName: 'Sustain.Life Reporting UAT'
PowerBIPath: '$(System.DefaultWorkingDirectory)/drop/Odata'

- task: PowerBIActions@5
inputs:
PowerBIServiceEndpoint: 'pbi-spn'
Action: 'Publish'
WorkspaceName: 'Sustain.Life Reporting UAT'
PowerBIPath: '$(System.DefaultWorkingDirectory)/drop/sql'

- task: PowerBIActions@5
inputs:
PowerBIServiceEndpoint: 'pbi-spn'
Action: 'Publish'
WorkspaceName: 'Sustain.Life Reporting PROD'

-
task: PowerBIActions@5
inputs:
PowerBIServiceEndpoint: 'pbi-spn'
Action: 'UpdateDatasource'
UpdateAll: true
DatasourceType: 'Sql' (What should be the data source type ?)
OldServer: 'XXXX.XXXXX.azure.snowflakecomputing.com'
NewServer: 'XXXX.XXXXX.azure.snowflakecomputing.com'
OldDatabase: 'ANALYTICS_DB_UAT'
NewDatabase: 'ANALYTICS_DB_PROD'
PowerBIPath: '$(System.DefaultWorkingDirectory)/drop/sql'(What should be the format for this?)


Thank you in advance for your help !
Best,

Gabriel




1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @gbc40,

According to your description, it seems like you are working with analysis service data source. So I think the data source type part should be 'AnalysisServices'.
For the PowerBIPath, maybe you can try to use ‘relative path’ of the rest API that you used to update the data source:

Full URL: https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.UpdateDatasources

Relative path: datasets/{datasetId}/Default.UpdateDatasources

BTW, the docuemnt mentions dataset created or modified using the public XMLA endpoint aren't supported. Are you working with XMLA endpoint? If that is the case, you should modify them to use the Azure Analysis Services client library for Tabular Object Model at first.

Datasets - Update Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
Michael_12345
New Member

How on earth did you conclude that the original poster is trying to set an Analysis Services data source?

They are clearly asking about Snowflake so I can't fathom how this answer was the accepted solution. Come on, Microsoft!

v-shex-msft
Community Support
Community Support

HI @gbc40,

According to your description, it seems like you are working with analysis service data source. So I think the data source type part should be 'AnalysisServices'.
For the PowerBIPath, maybe you can try to use ‘relative path’ of the rest API that you used to update the data source:

Full URL: https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.UpdateDatasources

Relative path: datasets/{datasetId}/Default.UpdateDatasources

BTW, the docuemnt mentions dataset created or modified using the public XMLA endpoint aren't supported. Are you working with XMLA endpoint? If that is the case, you should modify them to use the Azure Analysis Services client library for Tabular Object Model at first.

Datasets - Update Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.