
Stuck - semantic model how to parameter the Lakehouse connection?
Through deployment pipeline, promoting the Dev semantic model to UAT workspace but after deployment Data source setting is not swapping Uat warehouse (copied below screenshot). In the pipeline deployment Data Source rules also disabled. And i tried to parameritized the experession.tmdl with below code and it's not working. Finally ChatGPT said fabric won't support change expression.tmdl and finally said to use the deployment pipeline and automatically M code will swap from dev to uat warehouse connection, but it's not happening. How to promote the semantic model?
expression Environment = "DEV" meta [IsParameterQuery=true, IsParameterQueryRequired=true, Type=type text, List={"DEV","UAT","PROD"}, DefaultValue="DEV"]
lineageTag: ebbd659f-278f-45d5-a23d-53537661e1d1
annotation PBI\_ResultType = Text
expression 'DirectLake - fab_core_gld_dwh' =
let
Env = Environment,
WorkspaceId = (
if Env = "DEV" then "yyyyyyy-16e7-yyyy-a5fd-yyyyyyy"
else if Env = "UAT" then "zzzzz-e834-4029-a3e4-cccccccc"
else if Env = "PROD" then "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"
else error "Invalid Environment"
),
LakehouseId = (
if Env = "DEV" then "xxxxxxxx-a9dc-44f1-b01b-xxxxxx"
else if Env = "UAT" then "yyyyyy-934f-tttttt-9b5b-zzzzzz"
else if Env = "PROD" then "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
else error "Invalid Environment"
),
OneLakeURL =
"https://onelake.dfs.fabric.microsoft.com/"
& WorkspaceId & "/"
& LakehouseId,
Source = AzureStorage.DataLake(
OneLakeURL,
[HierarchicalNavigation = true]
)
in
Source
annotation PBI\_IncludeFutureArtifacts = False