Forum Discussion
How to use variable library for deployment from Test to Prod?
- 11 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.
I created a simple table and stored it in a Lakehouse using Dataflow Gen2. Then, I used this Lakehouse as a data source. After defining my variables in the Variable Library, I configured the Pipeline dynamically so that it uses a dynamic source and destination address — and it works successfully.
However, I would like to know whether it’s possible to add this logic directly in the query code (M language), so that I wouldn’t need to use a Copy Data activity in the pipeline during deployment.
Thank you very much for your support!
- v-saisrao-msft11 months ago
Community Support
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.