Delete Multiple Azure Data Factory Pipeline - azure

I want to delete 50+ ADF pipelines linked to Azure Devops GIT. We can do it manually via Azure Front-end, but it's a tedious task. I have tried deleting it via Powershell but powershell can only delete the pipelines which present under DataFactory(PFA the screenshot) mode whereas it is not impacting pipelines linked to Azure DevOps GIT.
Can anyone suggest any better approach to do this activity ?

If you just want them out of git, you can create a feature branch from the ADF editor. Then use Visual Studio or any git repo navigator to pull that branch to your local file system. Manually delete the files and then push back to git and do a pull request to merge back into your master.
If you really want to purge them completely, you can do the same manual deletion upon your ADF publish branch too.

I accomplished the task of deleting pipeline by :-
Creating a clone of the Dev branch in my local Visual studio.
By deleting all .json file (corresponding to the pipeline I wanted to delete) from newly cloned local branch.
Commit, Sync and Push the change to Dev GIT branch.
This is the easiest way I could find to delete 50+ pipelines in one shot.

Related

Deleting a data factory component not working using CI CD pipelines

I have implemented CI CD for Azure Data Factory. When I modify a pipeline and publish my changes and deploy it to UAT, the changes reflect properly. The problem arises when I delete any component in dev and publish it and deploy it to the UAT data factory. The changes do not reflect.
How to handle the delete scenario in CI CD pipelines?
As of now I am creating separate releases. Everytime they are deployed, the deleted changes are not reflecting.
CI\CD only merge changes, so it doesn't delete objects.
If you are using the Azure DevOps release pipeline, there is a Microsoft PowerShell sample script that has this ability that you can add to your release pipeline.
Explanation on how to use the script in a release pipeline - here
Link to the GitHub project containing the actual script.
Set the parameter deleteDeployment to true (like this: -deleteDeployment $true).

Missing deployment templates in Synapse 'main' branch

Few days ago I had to recreate Azure Synapse Workspace. I had connected Git repository (Azure DevOps Git).
After Workspace recreation I reconnected to repo and restored whole project (pipelines, linked services etc.).
Unfortunately after this action template files are not being updated in main branch after Publishing changes in Synapse:
They are being updated only in Publish branch which should be rather read only:
I tried to create completely new repo, but with the same result - main folder is being created and synced properly:
but Templates folder and files are not created in main branch.
I'm using these templates for deployment to production and I need to make customizations so it's much easier to work with them in main branch.
Do you know how could I 'restore' previous behaviour?
Templates folder and files are not created in main branch.
To recover a deleted Azure Synapse instance that has source control configured either in GitGub or Azure DevOps, you need to create the new Branch. Follow below steps.
Create a new Azure Synapse instance of the service.
Reconfigure Git with the same settings, but make sure to import existing resources to the selected repository and choose New branch.
While configuring the repository, under Collaboration branch choose + Create new and create a new branch.
Create a pull request to merge the changes to the collaboration branch and publish.
In case there was a Self-hosted Integration Runtime in a Synapse workspace, a new instance of the IR must be created in a workspace. For an on-premises or virtual machine IR instance, they must be uninstalled and reinstalled, and a new key obtained. After setup of the new Integration Runtime is completed, the Linked Service must be updated to point to new IR and the connection should be tested again, or it will fail with error invalid reference.
I have tried to repo the same with a sample pipeline in the workspace, and when I restored it I can see both pipeline and template folder in the Repo. Refer below image.
Please refer Troubleshoot CI-CD, Azure DevOps, and GitHub issues in Azure Data Factory and Synapse Analytics to know more on backup and restore Azure Synapse.

Configure Azure DevOps repository in Databricks through ARM template or Powershell

I am looking for a sample ARM template which can setup my Azure DevOps repository into Azure Databricks. This will help me deploy my Master branch directly on ADB workspace.
I tried to do manually on portal and it works, but the repos path for the notebooks shows my email_id, which is not good in Production.
I want to configure through a Powershell OR an ARM template while creating Databricks. The same problem I am facing on Azure dataFactory as well.
Please help me resolve it.
It's not possible as of today - there is no API for creating a checkout. It will be possible only when Databricks Repos will start to provide corresponding API for creating the checkouts of repositories, not only "Update checkout" API that is available right now.
If you're concerned with the checkout created in your own folder, you can just create a Folder inside Repos, call it like "Production", and then do checkout inside that folder (pictures are taken from my demo of Repos with Azure DevOps):
To deploy Notebooks from your master branch to another workspace, I would recommend to trigger a deployment pipeline from the master branch onto the target databricks worskpace.
That way, no need to setup Repos in the target environment.
You use Repos in your development workspace (with your email in path)
You commit to the branch you work on and eventually merge / PR to master
Once on Master branch, a DevOps pipeline is triggered and deploys the notebook to your target workspace on the path you want

Azure databricks CI CD pipeline to delete notebooks on production

I have a CI/CD pipeline in place to deploy notebooks from dev to production in an Azure databricks workspace.
However, it is not deleting the notebooks from production, when those notebooks have been removed from development and are no longer in Azure git repository.
I want to delete all notebooks which have been removed from source, as a part of build/release process.
Is there a way to achieve this?
The easiest way is when there are new commits in Azure DevOps git repository, you could redeploy the notebooks by checked the Clean Workspace Folderoption:
Otherwise, you could add a powershell script task to compare files in two folders. The follow case may give you a start: Comparing folders and content with PowerShell

ADF Collaboration branch vs Publish branch

In my ADF I have set publish branch to the same branch as my source branch using publish_config.json
I can now save and publish to a single branch without setting a collaboration branch (collaboration branch also is seen with a star). I can simple select my branch from the drop down in ADF and work on it. As such what is the use of a collaboration branch?
The publish branch is just a place to store the generated ARM files for importing to another ADF. You only need the ARM files when importing to another ADF.
Your collaboration branch is the only branch where you get the "publish" button.
The collaboration branch is different also from the others for being able to call ADF pipelines from logic apps or anything else external to ADF (after using the publish button).

Resources