How to make Azure DevOps not put the query of a pull request on one single line when using Synapse?

Viewed 36

When we make a change in one line in a certain script in Synapse, it treats that change like a complete overhaul of the entire script in DevOps because DevOps reads the entire file in just one line, probably due to the fact that the script is JSON on the backend of Synapse.

This makes it hard with conflicts, because now it gives a conflict if someone changes line 1 in branch A and someone else changes line 30 in branch B for example, because the entire script is seen as 1 line in DevOps.

Does anyone know any workarounds for this?

1 Answers

We use a couple of methods with Azure Synapse Analytics. One is trunk-based development, so shorter lived feature-branches merged more regularly, reducing the likelihood of conflicts. Merges into main are by Pull Request only and the feature branch is deleted on PR.

This will help minimise but not remove merge hell. If you have a number of shared or core components, eg a common Synapse pipeline or notebook, then you might just have to make a business process that says 'only one person can work on this at once'. We also have a number of parameterised linked services, datasets and pipelines so they don't proliferate too much.

For SQL scripts and dedicated SQL pool database objects, I use SQL Server Data Tools (SSDT). I do not use Synapse Studio to save SQL scripts. Even if you do, it's not that easy to run them automatically.

Related