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?
CodePudding user response:
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')