Problem Statement
As of Feb 05, 2022; there is a limitation in Synapse 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.

So how can one get the count of activities within an existing pipeline?
Prerequisites
- Synapse
- Powershell
Solution
1. Open Powershell in admin mode and import the Azure SDK modules by executing the below commands.
Import-Module Az.Accounts
Import-Module Az.Synapse
2. Install the custom module by executing the below command.
Install-Module -Name AzSynapseActivities
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 Synapse and its corresponding activity list and activity count, execute the below command.
Get-AzSynapseActivities -WorkspaceName “<WorkspaceName>” - To get the details of a specific pipeline in Synapse and its corresponding activity list and activity count, execute the below command.
Get-AzSynapseActivities -WorkspaceName “<WorkspaceName>” -PipelineName “<PipelineName>”
Output Results
1. Overall Synapse output

2. Specific Pipeline output

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

Join the conversation! Your thoughts help the community grow.