Azure数据工厂-在动态内容中使用系统变量

时间:2020-09-03 11:27:59

标签: azure azure-data-factory azure-data-factory-pipeline

我正在尝试在动态内容字段中使用系统变量'@pipeline()。TriggerTime'。

我有一个“复制数据”活动,该活动具有一个接收器数据集到一个文件夹。

enter image description here

在此接收器数据集中,我尝试将文件路径设置为

@concat('Trigger_',formatDateTime(@pipeline().TriggerTime, 'ddMMyyyyHHmmss'), '.trg')

enter image description here

但是我收到以下错误消息。

enter image description here

该活动包含在“条件条件”块中,该条件本身包含在“ ForEach”中,但是此变量应该在管道中是全局变量,因此我不知道为什么它不起作用。

感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

如Joel所说,只需将“ @pipeline”更改为“ pipeline”。

@concat('Trigger_',formatDateTime(pipeline().TriggerTime, 'ddMMyyyyHHmmss'), '.trg')

如果要使用多个功能,只需在开头添加@。 如果要获取函数的字符串,则需要添加双@,例如“答案为:@@ {pipeline()。parameters.myNumber}”,返回字符串答案为:@ {pipeline()。parameters.myNumber }。

更多细节,您可以参考此documentation