At Microsoft, we love to hear your voice! The Synapse community asked for SqlPackage’s long-awaited support for Azure Synapse Analytics Serverless SQL Pools, and we delivered! Now you can automate th...
Hi folks, Thanks for sharing your feedback! I agree with your comments as this is still very limited, we are in the early days of CICD for serverless, long road ahead 🙂 we have been working hard to improve the tooling and we expect this to be supported in VS2022 very very soon, stay tuned 🙂
although not being an elegant solution, I've been working on this approach below, using a yaml pipeline to build the incremental script to update the target schema + a release pipeline to deploy this script. Feel free to test and modify this code, adjusting the logic to your scenario, I'm sharing this code as a baseline for dev/testing purposes only.
Here's the logic being used:
1- use sqlpackage to extract the dacpac from the source pool 2- use sqlpackage to create a Transact-SQL incremental update script that will be used to update the schema of the target pool
3-use powershell to replace the t-sql script content (adding secrets to database scoped credentials using SAS, changing storage account names, replacing SAS secrets) and generate a new (final) t-sql script to update the target schema 4-publish the script as an artifact so it can be used by the release pipeline, during the CD workflow.
steps from the YAML:
steps:
- task: SqlAzureDataWarehouseDacpacDeployment@1
displayName: 'EXTRACT THE DACPAC FROM SOURCE POOL'
Then, to deploy this script, you can setup a release pipeline, for example, adding the Azure SQL Datawarehouse Deployment task and using "SQL Script file" as Deploy type. of course you need to add the script file as an artifact to your release.
again, not an elegant solution, but something that you can evaluate to implement your CICD workflows for serverless, until we get the support in VS2022 🙂