Reputation: 229
I have a Lookup that gives as a result a column with 200 results. Then i need to use each row in another pipeline, using a ForEach.
I've tried @activity(Lookup1).output.value
but It does not seem to work.
Is there a way to do this?
Upvotes: 0
Views: 7466
Reputation: 6114
If you want to use the output of Lookup
activity with ForEach
loop where both Lookup activity and Foreach activity are present in the same pipeline, then @activity('Lookup1').output.value
will work. But if Lookup activity is in one pipeline and you want to pass this result to ForEach activity in another pipeline, you need to follow a different approach.
Look at the following demonstration (Both activity in same pipeline):
Lookup
activity selects 10 rows of a single column in my table.ForEach
activity, I have given the value @activity('Lookup1').output.value
for items.script
activity to insert values into a table. The pipeline runs successfully and inserts values into my target table.When Lookup is in one pipeline and for each in another:
lookup_pipeline
pipeline has lookup activity (selects 10 rows of a table column) and execute_pipeline
pipeline has foreach activity.values
of object
type.lookup_pipeline
and create an execute pipeline
activity. Select invoked pipeline as execute_pipeline
. Once you do this, the parameter values
appears below and you can specify its value (@activity('Lookup1').output.value
) here.execute_pipeline
and give the value for items as @pipeline().parameters.values
lookup_pipeline
, it successfully runs and gives the output.Note:
lookup
and foreach
in same pipeline(pipeline1), create execute pipeline
activity inside foreach
activity and pass the row value as @item()
(another pipeline 'pipeline2' must have parameter of required type to get row value passed from 'pipeline1').Upvotes: 2