Javi Hernandez
Javi Hernandez

Reputation: 344

Azure Data Factory V2: workaround to not being able to have a forEach activity inside a If Condition activity

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.

enter image description here

Is there any way of looping through items only if a condition is met in ADF?

Upvotes: 0

Views: 8525

Answers (1)

Joel Cochran
Joel Cochran

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

Related Questions