Reputation: 344
I want to have a forEach activity to be run if it meets some condition (inside a If Condition activity). But I get the following error:
ForEach activity ('') is not allowed under a Switch Activity.
Is there any way of looping through items only if a condition is met in ADF?
Upvotes: 0
Views: 8525
Reputation: 7748
You will need to architect your solution around the nesting restrictions like this. This is typically solved by placing the conditional workloads in other pipelines and using the Execute Pipeline activity inside the parent pipeline. You may need several child pipelines based on the complexity of the workloads. Use parameters to pass dependent values and the "Wait on completion" action to control concurrency.
Upvotes: 1