Identifying the Count of Activities within a Pipeline in an Azure Data Factory

Problem Statement

As of Oct 19, 2023, there is a limitation in Azure Data Factory V2 wherein a user can add only 40 activities within a pipeline, and in case if the number of activities within a pipeline exceeds 40, the user gets the below error.

ActivityError

So, how can one get the count of activities within an existing pipeline?

Prerequisites

  • Azure Data Factory
  • Powershell

Solution

Step 1. Open Powershell in admin mode and import the Azure SDK modules by executing the below commands.

Import-Module Az.Accounts
Import-Module Az.DataFactory

Step 2. Install the custom module by executing the below command.

Install-Module -Name AzDataFactoryV2Activities

Step 3. Now the environment is set for us to execute the commands to fetch the pipeline details.

To get the list of all pipelines in an ADF and its corresponding activity list and activity count, execute the below command.

Get-AzDataFactoryV2Activities -ResourceGroupName “<<RGName>>” -DataFactoryName “<<ADFName>>”

To get the details of a specific pipeline in an ADF and its corresponding activity list and activity count, execute the below command.

Get-AzDataFactoryV2Activities -ResourceGroupName “<<RGName>>” -DataFactoryName “<<ADFName>>” -PipelineName “<<PipelineName>>”

Output

  1. Overall ADF output.
    ADF Output
  2. Specific Pipeline output.
    Pipeline Output

This would avoid manually counting the number of activities within any pipelines.


Similar Articles