I have a list of document numbers stored in a table in SQL Server database.
I want to pass these values to "For Each" activity in ADF.
I tried lookup activity and stored procedure activity but I'm unable to pass it to "For Each" activity as it expects an array.
I retrieved the docNumber
column number using lookup activity with below query:
select docNumber from docs
The values fetched successfully. I pass those values into foreach activity with below dynamic expression:
@activity('Lookup1').output
Added setvariable activity in foreach activiy with below expression:
@string(item().docNumber)
When I execute the pipeline, I got the same error:
I changed the foreach activity item expression as mentioned below:
@activity('Lookup1').output.value
And again, I executed the pipeline, it executed successfully without any error: