Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
DarpanP
New Member

How to automatically switch database connections when deploying Data Pipeline from Dev to QA

Body:
Hello Community,

I am working with Microsoft Fabric workspaces and facing an issue during deployment.

Scenario:

  • I deployed a workspace from Dev to QA.

  • The workspace includes a Data Pipeline.

  • After deployment, the pipeline’s Lookup activity and the pipeline database connection are still pointing to the Dev database connection.

Problem:
Currently, I have to manually update the database connection in the Lookup activity and Data Pipeline after every deployment.

Expectation:
I would like to configure Deployment Rules (or any other supported mechanism) so that during deployment, the pipeline and lookup automatically point to the correct QA database connection instead of Dev.

Question:

  • Is there a supported way to parameterize database connections in Data Pipelines during workspace deployment?

  • Or is this a current limitation of Fabric Deployment Rules?

Any guidance or workaround will be very helpful.

Labels: Data Factory, Administration, General Discussion

4 REPLIES 4
Shahid12523
Memorable Member
Memorable Member

Solution:
Parameterize database connections in Linked Services (e.g., ServerName, DatabaseName).

Pass these parameters from the pipeline.

Use Deployment Rules to set environment-specific values for QA, Dev, Prod.

Alternative: Create separate Linked Services for each environment and make the pipeline pick the correct one via a parameter.

Key point: Without parameterization, Fabric requires manual updates—automatic switching isn’t supported.

Shahed Shaikh
v-echaithra
Community Support
Community Support

Hi @DarpanP ,

I hope the information provided is helpful.I wanted to check whether you were able to resolve the issue with the provided solutions.Please let us know if you need any further assistance.

Thank you.

v-echaithra
Community Support
Community Support

Hi @DarpanP ,

Thank you for reaching out to Microsoft Community.

Microsoft Fabric's current CI/CD deployment process presents a challenge when it comes to environment-specific connections in data pipelines and Lookup activities. Unlike semantic models, dataflows (Gen1), and reports, which are supported by Fabric’s deployment rules, pipelines and Lookup activities retain their original connection GUIDs after deployment. This means that even if a resource with the same name exists in the QA or Prod environment, the pipeline will still point to the Dev resource unless manually updated.

You can try this workaround to use the new Variable Libraries feature, which is currently in preview. This allows you to define configuration variables such as connection object IDs and database names with default values for Dev and alternate values for QA or Prod. Within your pipeline, you can reference these variables using dynamic expressions under “Dynamic Content.” When the pipeline runs in the target workspace, the active value set from the Variable Library ensures the correct GUID is used. However, keep in mind that this method only supports GUID-based parameterization, and data preview is disabled for parameterized activities.
Reference: Variable library integration with Data pipelines (Preview) - Microsoft Fabric | Microsoft Learn
Parameterization - fabric-cicd

Another option is to use the open-source Fabric-cicd deployment tool. This tool enables automated substitution of connection GUIDs by defining mappings in a parameter.yml file. You specify the find_key path in the pipeline JSON that points to the connection GUID, and then map it to environment-specific GUIDs for QA or Prod. During deployment, Fabric-cicd updates the pipeline JSON accordingly before pushing it to the target workspace. This approach is reliable and automates the GUID swapping process, though it does require managing pipeline files outside the Fabric UI.

Both methods offer viable solutions depending on your workflow preferences and tolerance for preview limitations or external tooling.
For more details on deployment rules, refer to Microsoft’s official documentation Create deployment rules for Fabric's ALM - Microsoft Fabric | Microsoft Learn.

Hope this helps.
Warm Regards,
Chaithra E.

spaceman127
Helper II
Helper II

Hello @DarpanP,

 

have you already looked at the Microsoft documentation on deployment rules?

 

https://learn.microsoft.com/en-us/fabric/cicd/deployment-pipelines/create-rules?tabs=new-ui

 

This is also explained again in a video by Guy in a Cube.

https://youtu.be/mXngl2ChBxM?si=txpVnv6fjPiUXT69

 

I hope that helps you for now.

 

Best regards

 

Helpful resources

Announcements
August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.