liprec / vsts-release-aas

Repository for my Analysis Service Azure pipelines tasks related to Azure Analysis Service or Power BI Premium
Other
27 stars 28 forks source link

How to change Data source connection for deployment to PowerBI premium? #109

Closed Silpa-Suresh closed 2 years ago

Silpa-Suresh commented 2 years ago

The Model.bim file contains Data source credentials for development environment. On trying to deploy it to production environment through Azure DevOps release pipeline, the deployment got succeeded and got the model deployed to PowerBI premium workspace. However, in production environment we got development credentials deployed. How to change the data source connections from task to be deployed to PowerBI premium workspace?

image

liprec commented 2 years ago

You can either use the set the option connectionType: sql an use the following options, but it only works if the source is a Azure SQL Database:

sourceSQLServer: 'SQLServer'
sourceSQLDatabase: 'Database'
sourceSQLUsername: 'Username'
sourceSQLPassword: 'Password'

Other option is to use the connectionType: advanced options to set the datasource connection yourself with the provided JSON:

datasources: |
[
  {
    "name": "<datasetname>",
      "authenticationKind": "UsernamePassword",
      "connectionDetails": {
      "address": {
        "server": "<sqlserver>",
        "database": "<databasename>"
      }
    },
    "credential": {
      "Username": "<username>",
      "Password": "<password>"
    }
  }
]
Silpa-Suresh commented 2 years ago

Tried both the ways, still the data source connection is same as in model.bim file. And not getting replaced from the variables provided in task section.

In the task information, we can see that the data source connection option is not applicable for PowerBI premium as in screenshot above.

Can you please suggest a method to be used for deploying data source connections changed to PowerBI premium?

liprec commented 2 years ago

Sorry, my bad: missed indeed the exception with Power BI Premium: I ran in too many issues/exceptions regarding the Power BI.

Easiest way is to use powerbi.com itself especially for the 'complex' OAuth connections. Another way is to use the execute-aas-tmsl task to update the credentials via an XMLA command. And maybe the Power BI REST APIs are working, although there is (now) a limitation stated that it is not working for datasets created via XMLA.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.