user14791234
user14791234

Reputation:

How to add date to filename during copy activity in Azure Data Factory?

I am pulling a folder from an SFTP in Azure Data Factory, this folder will always have the same name, so I specified it explicitly in my copy activity, but I am trying to figure out how to add the date that it is being copied over to the current file name. The folder is being taken from the SFTP and being stored in ADLS Gen2. Attached below is the copy activity and the source data set.

enter image description here

enter image description here

Upvotes: 3

Views: 9415

Answers (1)

Ruben Ravnå
Ruben Ravnå

Reputation: 697

In the Sink dataset, you can use something like this in the filename:

@concat('EmailTrackingExtract_',formatDatetime(utcnow(),'dd-MM-yyy'),'.csv.zip')

Upvotes: 5

Related Questions