How to append file name with date

Snv, Sudhir K 40 Reputation points
2023-10-12T19:30:30.45+00:00

I want to add dynamic file names to my sink file as export data_date but the date should be in 10days difference when pipelinerundate in adf.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nandan Hegde 36,146 Reputation points MVP Volunteer Moderator
    2023-10-13T03:24:19.9066667+00:00

    Hey,

    You can use dynamic expression to achieve that :

    @concat(pipeline().parameters.FileName,adddays(pipeline().TriggerTime,10))
    

    where below represents the 10 days diff

    adddays(pipeline().TriggerTime,10)
    

    Note : you would also have to concat the file extension at the end


1 additional answer

Sort by: Most helpful
  1. Smaran Thoomu 24,110 Reputation points Microsoft External Staff Moderator
    2023-10-13T14:06:22.7566667+00:00

    Hi Snv, Sudhir K, Welcome to Microsoft Q&A platform and thankyou for posting your question here.
    In addition to the information provided above, please refer to this GIF for a more detailed demonstration.

    I have used the following expression at the sink: @concat('export data_',adddays(utcnow(),10)) based on your requirement.
    permissions2

    I hope this will help. Please let us know if any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.