Forum Discussion
Copy Job item appears to hardcode database name resulting in issues after CI/CD deployment
We have a Copy Job item that uses an on-prem SQL Server as its source. The connection has been parameterized. When deployed to the prod workspace, the source activity is expecting the same database name as the one being used in the lower environment. There does not appear to be a mechanim to either alter the database name or parameterize the database name.
6 Replies
- audreygerredSuper UserYou're running into a current limitation of Fabric Copy Job: while you can bind the connection object to a Variable Library (and thus change servers/credentials across environments), the database name in the Copy Job’s SQL source is not parameterizable—it remains a hard‑coded string in the job definition. That’s why, when you deploy to Prod, the source still points to the Dev database name. This behavior has been reported by others and documented with JSON snippets showing the connection variable is respected but the
databaseproperty stays literal.One workaround is:Use a Pipeline → Copy activity instead of Copy Job, and parameterize inside the activity
Pipelines give you more knobs than Copy Jobs. For SQL sources in a Copy activity, you can:
- Switch to Query or Stored procedure mode and parametrize inputs (e.g., pass a database‑specific schema or table list, or drive routing with parameters) rather than relying on the “Table” picker that bakes in a DB name.
- Combine with Variable Libraries for connection selection at runtime (servers/credentials), which are supported for pipelines.
- Configure SQL database in a copy activity (Preview) - Microsoft Fabric | Microsoft Learn
- SQL database connector overview (Preview) - Microsoft Fabric | Microsoft Learn
- Parameterize Connections in Microsoft Fabric Data Factory using Variable Libraries – SQLServerCentral
- rajm00Regular Visitor
Thank you for your response. Would you happen to know if Microsoft is working on a fix?
- v-priyankataCommunity Support
Hi rajm00
Thank you for reaching out to the Microsoft Fabric Forum Community.
audreygerred KevinChant Thanks for the inputs. suggestion from user are helpful,
If that is the case then please reach out to support team, we regret the inconvenience caused Kindly raise a support ticker here How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn.
Thanks.- v-priyankataCommunity Support
Hi rajm00
I hope you’ve submitted the support ticket. Once you receive a solution, please share it here so it can help others facing the same issue. If you have any further questions, feel free to reach out to the community.
Thanks.
- KevinChantSuper User
You can change it depending on your CI/CD deployment method of choice. For example, when using the fabric-cicd Python library as a layer of abstraction you can change is with a parameter file.
- deborshi_nagSuper User
Hi rajm00
As others mentioned, it is currently a limitation within Microsoft Fabric, because the database name in a Copy Job is stored as a literal. Your best bet is to change the Copy job into a Pipeline with a Copy activity. You can pass the database name as a Pipeline parameter.
Hope this helps - please appreciate giving a Kudos or accepting as a Solution!