Forum Discussion
Fabric CI/CD: Data Pipeline fails with RequestValidationFailed (SQL Connection) when deployed via SP
- 8 months ago
Hi CloudVasu
Q: Is connection mapping (Deployment Rules) mandatory for Data Pipelines when deploying via SPN, even if connection names already exist in the target workspace?
A: No, Deployment Rules are not valid for Data Factory pipelines, they cover semantic models. If you name your connection exactly the same in the target workspace, there will be no rules required.
Q: Are there additional authorization or binding steps required for SPNs to use SQL connections during cross-workspace deployments?
A: Connections are valid within tenant scope - your SPN should be granted either a read or an use permission on the connectiuon object it will run against, both in source as well in the target. If you don't do this, the deployment will fail at validation.
Q: What is the recommended way to automate the swap of SQL connection strings (Server/Database name) during deployment?
A: You can use a variable library and parameterize your pipeline, including the connection selection. The correct way is to store 1 value set per env. Dynamic content can bind to the variable library.
Hope that makes sense - please appreciate by leaving a Kudos or accept it as a Solution to help others.
Hi CloudVasu
Q: Is connection mapping (Deployment Rules) mandatory for Data Pipelines when deploying via SPN, even if connection names already exist in the target workspace?
A: No, Deployment Rules are not valid for Data Factory pipelines, they cover semantic models. If you name your connection exactly the same in the target workspace, there will be no rules required.
Q: Are there additional authorization or binding steps required for SPNs to use SQL connections during cross-workspace deployments?
A: Connections are valid within tenant scope - your SPN should be granted either a read or an use permission on the connectiuon object it will run against, both in source as well in the target. If you don't do this, the deployment will fail at validation.
Q: What is the recommended way to automate the swap of SQL connection strings (Server/Database name) during deployment?
A: You can use a variable library and parameterize your pipeline, including the connection selection. The correct way is to store 1 value set per env. Dynamic content can bind to the variable library.
Hope that makes sense - please appreciate by leaving a Kudos or accept it as a Solution to help others.
Q: Are there additional authorization or binding steps required for SPNs to use SQL connections during cross-workspace deployments?
A: Connections are valid within tenant scope - your SPN should be granted either a read or an use permission on the connectiuon object it will run against, both in source as well in the target. If you don't do this, the deployment will fail at validation.
In my case, after granting access, it did not work immediately. I removed and re-added the SPN to the SQL connection, waited for propagation, and then the deployment worked successfully.
Q: What is the recommended way to automate the swap of SQL connection strings (Server/Database name) during deployment?
A: You can use a variable library and parameterize your pipeline, including the connection selection. The correct way is to store 1 value set per env. Dynamic content can bind to the variable library.
The recommended approach is to use a Variable Library and parameterize the pipeline, including connection selection.
Maintain one set of variables per environment, and bind them using dynamic content during deployment.
I followed the official documentation below, and the deployment is now working as expected:
https://learn.microsoft.com/en-us/fabric/cicd/variable-library/variable-library-cicd
Thank you for the detailed explanation. This helped me resolve the issue and the deployment is now working as expected