Forum Discussion

Dev_003's avatar
Dev_003
Regular Visitor
2 years ago
Solved

Parameterized data source (Azure Databricks) connection with the powerBI.

Hello Team, Hope every one is doing great!   I am finding a way to parameterized multiple connnections(dev, test, stage, prod) of Azure databricks with the power bi desktop, I found we can set the...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Dev_003 ,

    You can follow the steps below to get it:

    1. Create a query parameter 'P_StudyID'

    2. Update the above codes as below: you can refer this thread

    = Value.NativeQuery(
    Databricks.Catalogs(Host, HttpPath, [Catalog=Catalog, Database=null, EnableAutomaticProxyDiscovery=null]){[Name=Catalog, Kind="Database"]}[Data],
    "SELECT rs.ID, " &
    "rs.Name AS siteName, " &
    "sub.SubjectID, " &
    "sub.SubjectIdentifier, " &
    "subStatus.Status_ID, " &
    "subStatus.Name AS StatusName, " &
    "sub.Study_ID " &
    "FROM " & Catalog & "." & Database & ".instance__subject sub " &
    "JOIN " & Catalog & "." & Database & ".instance__status subStatus " &
    "ON sub.Status_ID = subStatus.Status_ID " &
    "JOIN " & Catalog & "." & Database & ".instance__site rs " &
    "ON sub.Site_ID = rs.Site_ID " &
    "WHERE sub.Disabled = FALSE " &
    "AND sub.Study_ID  ="&P_StudyID&" ",
    null,
    [EnableFolding=true]
    )

    Best Regards