Customizing Kusto (Data Explorer) Connections in Deployment pipeline

Comments 0

Share to social media

When organizing our SDLC (Software Development Lifecycle) in Power BI/Fabric, we use Deployment Pipelines and create rules to change connection configurations every time we promote an object from one environment (dev for example) to another (test, for example). Kusto connections, on the other hand, are not so simple.

You can check more about Deployment Pipelines on my video about them or on a blog post explaining how to use them with notebooks.

Kusto connections don’t appear when configuring rules for deployment pipelines. We can’t make a direct configuration of the rule to change the connection according to the environment.

The image below shows how the Kusto connection doesn’t appear by default among the Deployment Pipeline rules.


A screenshot of a computer

Description automatically generated


There is a 2nd option: Parameterize the connection in Power BI and use the rules to change the parameter value.


Parameterizing the Kusto Connection

The Kusto connector in Power BI doesn’t allow parameters out of the box. I mean, even when you configure data source connections to always allow parameters (this is a power bi configuration), the kusto connection window doesn’t give you the option to create parameters.

We need to go directly to the kusto query. A kusto query in power query has the first line like this:

= AzureDataExplorer.Contents(“myKustoServerAddress”, “myKustoDatabase”)

The two pieces of information we would like to turn into parameters are in string format. In this way, it’s easy to create Power Query parameters and “manually” use the parameters on this statement.

In Power Query, you click the button Manage Parameters and on the parameters window you create two: KustoServer and KustoDB, both as Text

A screenshot of a computer

Description automatically generated


Once they are created, the parameters appear as an additional query in Power Query. You select them to fill their default value. Usually you would like the default value to be the value for the development environment.


A screenshot of a computer

Description automatically generated


After publishing the semantic model, you can use parameter rules on the deployment pipeline, instead of connection rules. The parameters will be visible for you to create the rules and in this way allow an easy transition from the development environment to the test environment.


A screenshot of a computer

Description automatically generated


About the author

Dennes Torres

See Profile

Dennes Torres is a Data Platform MVP and Software Architect living in Malta who loves SQL Server and software development and has more than 20 years of experience. Dennes can improve Data Platform Architectures and transform data in knowledge. He moved to Malta after more than 10 years leading devSQL PASS Chapter in Rio de Janeiro and now is a member of the leadership team of MMDPUG PASS Chapter in Malta organizing meetings, events, and webcasts about SQL Server. He is an MCT, MCSE in Data Platforms and BI, with more titles in software development. You can get in touch on his blog or at his work

Dennes's contributions