Foreach Loop Not working as expected in Azure Data Factory

Viewed 63

My Lookup activity Output in ADF have 10 rows. I want to take only the output of first 5 rows dynamically inside foreach loop. So what expression need to put inside my items expression of Foreach Activity.

2 Answers

You can use the take function to get the first five items from your collection. Set this in the Items property of the For Each activity:

@take(variables('vArray'),5)

An example:

ADF with take

Related