Reputation: 83
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.
Upvotes: 1
Views: 761
Reputation: 14379
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:
Upvotes: 1
Reputation: 4925
You can use rownumber in dataflow to generate the row numbers http://datanrg.blogspot.com/2020/10/row-numbers-in-azure-data-factory-data.html?m=1
And then use filter activity to filter top 5 rows
Upvotes: 0