Reputation: 13
I am using azure data factory to download a file using the copy activity. The copy activity is called inside the for each
activity. I need to pass a variable that can be used in the copy activity .
But I get an error saying "The output of variable <variable name> can't be referenced since it is not a variable of the current pipeline"
.
Upvotes: 1
Views: 2592
Reputation: 713
Before you can use a variable, you must first declare it in the scopt of the pipeline.
Please be aware that when setting the value of a variable, it cannot reference itself (X=X+1). I.E. You cannot use a variable as a counter during a for-each loop. Pipeline variable declaration
Upvotes: 1
Reputation: 23782
You could try to use Set Variable Activity with Copy Activity in the ForEach Activity.
Set Variable Activity:
Use the Set Variable activity to set the value of an existing variable of type String, Bool, or Array defined in a Data Factory pipeline.
Then you could use it with dynamic content,such as @activity('Set Variable1').value
Upvotes: 1