Forum Discussion

eshwar5's avatar
eshwar5
Copper Contributor
Mar 22, 2023

Azure Data Factory

Dear Team

 

I am Eshwar, I have below query 

 

Having 3 files from the blob storage container like below, from the below listed files wanted to copy only selected file (Filename_20230322.csv) from my source blob to target raw storage container location. without hardcoding filename.

 

How can we identify the right file from the file extension date from the adf 

 

1- Filename_20230320.csv

2- Filename_20230321.csv

3- Filename_20230322.csv

 

Can anyone help me with this requirement how it can be done from Azure Data Factory , Thank You!!

 

 

 

 

1 Reply

  • gawankarsanket's avatar
    gawankarsanket
    Copper Contributor

    Hello eshwar5
    You can use parameterized Dataset that will prompt you for filename while executing pipeline.
    Also if you are looking file with today's date, you can dynamically set it using contact and date time function

    eg. enter filename dynamically at source. 

    "   

    @concat('Filename_',formatDateTime(utcNow(),'yyyy'),formatDateTime(utcNow(),'MM'),formatDateTime(utcNow(),'dd'),'.csv')