top of page

Deployment pipelines and Power BI semantic models with Direct Lake on OneLake tables

Dec 2, 2025
2 min read

Updated: Sep 12

Update (September, 2026): Web modeling and TMDL view works when a parameter is added.


Deployment pipelines allow you to develop models and reports in a development workspace then push to a production workspace when ready. This ensures as you make changes to your semantic models you have time to update your reports and test them before impacting your report consumers. Apps are great for this too but only shield reports changes from your consumers. Apps are a great way to share your reports widely and to specific audiences.


When utilizing Direct Lake tables in a semantic model, Direct Lake on SQL works well with deployment pipelines rules. The connector used will accept binding to different data sources.


Using data source rules with Direct Lake on SQL tables in deployment pipelines
Using data source rules with Direct Lake on SQL tables in deployment pipelines

Direct Lake on OneLake is a marked improvement to Direct Lake on SQL, allowing multiple Direct Lake source tables and adding tables from import sources in the same semantic model. But, in deployment pipelines rules, the connector doesn't support binding to different data sources. You can still use the parameter rules part of deployment pipeline rules.


Using parameter rules with Direct Lake on OneLake tables in deployment pipelines
Using parameter rules with Direct Lake on OneLake tables in deployment pipelines

It is easy to set up, and the semantic model refreshes and works as expected. You can set it up with Power BI Desktop's TMDL view when live editing or TMDL view in web modeling.


In TMDL view, drag the expression to the editor to see the TMDL script. Modify it by adding in another expression underneath and then referencing that expression in your first one. When done, apply the script.


createOrReplace

	expression 'DirectLake - LH_01' =
			let
			    Source = AzureStorage.DataLake(#"OneLakeURI", [HierarchicalNavigation=true])
			in
			    Source

		annotation PBI_IncludeFutureArtifacts = False

	expression OneLakeURI = "https://onelake.dfs.fabric.microsoft.com/GUID1/GUID2" meta [IsParameterQuery = true, IsParameterQueryRequired = true, Type = "Text"]

		annotation PBI_ResultType = Text

There will be lineageTags in your script, I just removed them from my code snippet above.


Here I took the existing URI and put it in a parameter. GUID1 is the Workspace ID and GUID2 is your Fabric source ID, in this case my Lakehouse ID. Be sure not to use the SQL analytics endpoint ID for any Direct Lake on OneLake source. Be sure "expression" is not indented for either expression.


You can always use other tools, such as Tabular Editor, XMLA in SSMS, or TMDL in any text editor, including editing the expression in a GIT repro in web. Here I will explain how to do it in VS Code using the Fabric Studio extension.


Using Fabric Studio in VS Code to edit the expressions TMDL file
Using Fabric Studio in VS Code to edit the expressions TMDL file

  1. Get VS Code and the Fabric Studio extension and Login to see your workspaces.

  2. In the Fabric workspaces section, find your semantic model

  3. Expand Definition folder

  4. Expand definition folder (yes there are two)

  5. Click on expressions.tmdl to open it in the editor

  6. Add the expression parameter and then reference it in your connection (see below)

  7. Save the tmdl file

  8. Right-click the Definition folder and choose Publish to Fabric.


Now when you go to your deployment pipeline and click on the rules, the semantic model should show the parameter rules section. Change the parameter to the new data source for the next stage!



Comments


Commenting on this post isn't available anymore. Contact the site owner for more info.

© 2021-2025 by Zoe Douglas (DataZoe). Proudly created with Wix.com.

  • GitHub
  • LinkedIn
bottom of page