bluedot
bluedot

Reputation: 782

Azure Data Factory - Use system variable in Dynamic Content

I'm trying to use system variable '@pipeline().TriggerTime' in a dynamic content field.

I have a 'Copy Data' activity which has a sink dataset to a folder.

enter image description here

Inside this Sink dataset, I try to set the filepath to

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

enter image description here

But I get the following error message.

enter image description here

The activity is contained in an 'If Condition' block which itself is contained in a 'ForEach' but this variable should be global in the pipeline so I don't see why it shouldn't work.

Thanks for any help.

Upvotes: 0

Views: 1059

Answers (1)

Steve Johnson
Steve Johnson

Reputation: 8660

As Joel comments,just change "@pipeline" to "pipeline".

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

If you want to use multiple functions,you just add @ at the beginning. If you want to get the string of functions,you need to add double @,such as "Answer is: @@{pipeline().parameters.myNumber}" return the string Answer is: @{pipeline().parameters.myNumber}.

More detail,you can refer to this documentation.

Upvotes: 1

Related Questions