Pattern match in Azure Data Factory RRS feed

  • Question

  • Hi,

    I have an requirement to copy the file with the below naming convention using azure data factory so, i am using the below pattern but it is not able to find the files with required pattern

    Required file: 01-daionewebit_2019-01-01.tsv.gz, 02-daionewebit_2019-01-01.tsv.gz

    File Pattern in ADF i am using: @concat('*daionewebit_', formatDateTime(adddays(utcNow(),-1), 'yyyy-MM-dd'),'*.gz') which is not working even i tried by adding string() function but i am getting the expected ouput

    If the same out pattern if use for exact file eg: @concat('daionewebit_', formatDateTime(adddays(utcNow(),-1), 'yyyy-MM-dd'),'.txt') is working.

    So, Can anyone please help me how to copy the files by using pattern matching  File1:01-daionewebit_2019-01-01.tsv.gz

    File 2: 02-daionewebit_2019-01-01.tsv.gz so, on..



    Wednesday, January 2, 2019 3:43 PM

All replies

  • When you say, it is not working are you getting any error message?

    Thursday, January 3, 2019 11:54 AM
  • The following works as long as the file name has the date as current date -1 in the copy activity. Make sure you give the folder name in the wild card folder  - also make sure you dont include container name in the wild card folder name.

    *daionewebit_@{formatDateTime(adddays(utcNow(),-1), 'yyyy-MM-dd')}*

    • Proposed as answer by vimalthomas Wednesday, January 15, 2020 4:33 PM
    Monday, January 13, 2020 11:05 PM
  • @Subash did vimalthomas suggestion work, or do you need more help?
    Wednesday, January 15, 2020 8:57 PM