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

1 REPLY 1
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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.