我们可以在每个循环或其他迭代活动中传递管道变量

问题描述 投票:1回答:2

我正在使用azure数据工厂使用复制活动下载文件。在for each活动中调用复制活动。我需要传递一个可以在复制活动中使用的变量。

但我得到一个错误说"The output of variable <variable name> can't be referenced since it is not a variable of the current pipeline"

azure azure-data-factory
2个回答
0
投票

您可以尝试在ForEach活动中使用Set Variable Activity和复制活动。

设置变量活动:

使用“设置变量”活动可设置数据工厂管道中定义的String,Bool或Array类型的现有变量的值。

enter image description here

然后你可以将它与动态内容一起使用,例如@activity('Set Variable1').value


0
投票

在使用变量之前,必须首先在管道范围内声明它。

  1. 转到管道视图
  2. 单击空白空间,这样您就不会专注于任何活动
  3. 选择“变量”选项卡
  4. 让你变量

请注意,在设置变量的值时,它不能引用自身(X = X + 1)。 I.E.在for-each循环期间,不能将变量用作计数器。 Pipeline variable declaration

© www.soinside.com 2019 - 2024. All rights reserved.