简体   繁体   中英

Dynamic dates in Azure Data Factory

I am trying to copy the data from the Azure SQL table to the CSV file in Azure Data Factory. CSV Filename must be appended with below date Filename_11_07

Where Filename --> comes from dynamic content
11 --> month
07 --> current date of last Sunday (Current date is 10th of Nov)
Would it be possible to manipulate the dates in dynamic content? Any other way to achieve this?

If you are executing your pipeline every Wednesday, you can minus 3 from the current date and extract out the month and day from it. If your pipeline can run at any time, then the solution will be a bit more complicated.

You can replace Filename with whatever dynamic variable you would like to use.

@concat('Filename_',substring(getPastTime(3,'Day'),5,2),'_',substring(getPastTime(3,'Day'),8,2),'.csv')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM