Search code examples
azure-data-factory

How to pass dynamic filename in azure data factory copy activity?


I want to copy a (ZIP) file from SFTP source based on current date, I am trying the below expression but it fails, can anyone tell me whats the correct way of doing it ?

enter image description here

enter image description here

Error


Solution

  • You are giving dynamic content in the parameter value that's why it is taking whole dynamic content as string which is mentioned in the error. Instead of that create a variable with dynamic content:

    @formatDateTime(utcnow(),'yyyy-dd-MM')
    

    Use that variable to get file name using below expression:

    @concat(variables('<variableName>'),'.zip')
    

    You will get the file name as below:

    enter image description here