Skip to content

Easier way to perform CI/CD for Azure Synapse Link for SQL Server 2022

Reading Time: 4 minutes

In this post I want to cover a much easier way to perform CI/CD for Azure Synapse Link for SQL Server 2022 using Azure DevOps than I showed before.

Azure Synapse Link for SQL Server 2022 recap

Just to recap, Azure Synapse Link for SQL Server 2022 transfers data from a SQL Server 2022 database to an Azure Synapse Analytics dedicated SQL Pool. It recently came out of preview and is now generally available.

Which are represented in the red squares in the below diagram. I cover Azure Synapse Link for SQL Server 2022 in more detail in another post. Where I cover my initial tests for Azure Synapse Link for SQL Server 2022.

Azure Synapse Link for SQL Server 2022 objects to update

Easier way to perform CI/CD

In another post I showed how you can use CI/CD to update both ends of Azure Synapse Link for SQL Server 2022 using Azure DevOps. Allowing you to update both a SQL Server 2022 database and an Azure Synapse Analytics dedicated SQL Pool in the same deployment pipeline.

Plus, I presented a session about that method for the Data Toboggan conference. You can now watch the video for the ‘Create Database Project for use with Azure Synapse Link for SQL Server 2022‘ session online. Clicking on the session name will open up the video.

By my own admission, the method I showed can become complex. Plus, I showed some more advanced concepts in that post. With this in mind, I have decided to cover an easier way in this post.

Which is where you only update the SQL Server 2022 database and recreate the tables in your dedicated SQL Pool when you start your link again.

You can enable the setting to drop and recreate the tables in your dedicated SQL Pool by selecting the ‘Drop and recreate table on target’ in your link settings, as below.

Drop and recreate table on target setting which is an easier way to perform CI/CD for Azure Synapse Link for SQL Server 2022
Drop and recreate on target link settings

You can use the Classic Editor within Azure Pipelines in Azure DevOps to create the dacpac for SQL Server 2022.

You can select classic editor by going into Azure Pipelines and then clicking on the ‘New Pipeline’ button. From there you can select the ‘Use the classic editor’ option.

Use the classic editor option

Once done you can add the below tasks to create your dacpac and publish it to Azure DevOps.

Build tasks as part of easier way to perform CI/CD for Azure Synapse Link for SQL Server 2022
Build tasks

Afterwards, you can use the Releases feature in Azure Pipelines to deploy your updates to the SQL Server 2022 instance.

Setup of Release pipeline
Deploy SQL Server 2022 update

Starting Azure Synapse Link

Once the updates have completed you can go back into Synapse Studio and check the link settings. You can do this by going into Synapse Studio, going to the Integrate section and selecting the link.

You can then click on Start. It looks like you do not even need to click on Refresh for this to work.

Starting Azure Synapse Link for SQL Server 2022
Clicking start

To confirm everything is running as it should I recommend going to the Monitor hub in Synapse Studio. You can than check that the link is running in the Link connections section.

Checking the link is working in the Monitor hub
Checking the link in the Monitor hub

Final words

As you can see this is a much easier way to perform CI/CD for Azure Synapse Link for SQL Server 2022 using Azure DevOps compared to my previous post.

At the end of the day which method you use mostly depends on whether or not you want to keep your data in the dedicated SQL Pool.

Of course, if you have any comments or queries about this post feel free to reach out to me.

Published inAzure DevOpsAzure Synapse Analytics

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *