Remove-AzureRmDataFactoryPipeline is not deleting ADF pipeline present under GIT branch

RATH, ARUN 26 Reputation points
2020-08-19T06:49:48.847+00:00

I have a requirement to delete 50 pipelines from my ADF. I tried powershell way using the below command :-

Remove-AzureRmDataFactoryV2Pipeline -Name "XYZ_DEF" -ResourceGroupName $resourceGroupName -DataFactoryName $dataFactoryName

I am getting "True" as response but I can still see the pipeline in my ADF under GIT branch.

Please let me know if powershell is the correct approach or there is any other smarter way to perform the same activity.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,655 questions
{count} votes

Accepted answer
  1. MartinJaffer-MSFT 26,236 Reputation points
    2020-08-19T20:45:17.923+00:00

    Hello @RATH, ARUN & @Vaibhav Chaudhari .
    Sorry for the confusion. Please let me clarify.

    Currently, GIT is affected only when using the visual authoring tool (adf.azure.com).

    Powershell, SDK's, and API's push changes directly to the Data Factory service. This means they publish the change directly, bypassing any GIT integration.

    Using Powershell to modify your Data Factory, while it is integrated with GIT, will result in changes to the 'Data Factory Mode' when using the visual authoring tool, but no changes applied to the GIT Mode.

    Thank you,
    Martin

    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. HarithaMaddi-MSFT 10,146 Reputation points
    2020-08-20T08:39:02.017+00:00

    Thank you @MartinJaffer-MSFT and @Vaibhav Chaudhari .

    @RATH, ARUN - Please let me know if ADO approach (Azure DevOps) to manage pipelines that can be leveraged for CI/CD as well helps for your requirement. Once repository is cloned to our local, we can delete pipelines at a go and push them to Developer branch as shown in below GIF. I have used visual studio for cloning, this can be done using GIT commands as well.

    Additional Info on CI/CD for ADF can be found in this link. We are also working with internal teams to understand alternate approaches and will share with you if this is not helpful.

    18997-repoapproachdelete.gif

    1 person found this answer helpful.

  2. Vaibhav Chaudhari 38,921 Reputation points Volunteer Moderator
    2020-08-19T08:05:08.357+00:00

    When GIT is enabled, PS command should directly update the objects in Data Factory mode.

    Below is the note from document - ADF - source-control

    Authoring directly with the Data Factory service is disabled in the Azure Data Factory UX when a Git repository is configured. Changes can be made directly to the service via PowerShell or an SDK.

    ----------

    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav


  3. RATH, ARUN 26 Reputation points
    2020-08-24T13:25:35.277+00:00

    I accomplished the task of deleting pipeline by :-

    1. Creating a clone of the Dev branch in my local Visual studio.
    2. By deleting all .json file (corresponding to the pipeline I wanted to delete) from newly cloned local branch.
    3. 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.