Forum Discussion
How to use variable library for deployment from Test to Prod?
- 10 months ago
Hi RouyAlfahel,
Dataflow Gen2 can be made dynamic by referencing Fabric Variable Library in the Power Query M code, which allows the source to switch between Test and Prod environments without relying on a Copy Data activity. However, the destination (sink) remains fixed at design time and cannot be parameterized, so adjustments for the sink must still be handled manually or through pipeline configuration.in humanize way
Use Fabric variable libraries in Dataflow Gen2 (Preview) - Microsoft Fabric | Microsoft Learn
Thank you.
Hello RouyAlfahel,
You’re right, you can use the Variable Library to parameterize both the source connection string and the destination when working with Pipelines or Notebooks. This is the recommended approach if you want to fully automate deployment from Dev → Test → Prod.
For Dataflow Gen2, there are still some limitations:
You can parameterize the source (server, database, schema, table, etc.) directly in Power Query M using variables.
But the destination (sink) can’t be parameterized with variables — it must be defined at design time and adjusted manually after deployment.
Docs:
- Variable library integration with Dataflow Gen2
- https://learn.microsoft.com/en-us/fabric/cicd/variable-library/variable-library-overview
- https://learn.microsoft.com/en-us/fabric/cicd/variable-library/tutorial-variable-library
Hope it can help you !
Best regards,
Antoine