Hi @HemanthKumar loka ,
Thankyou for using Microsoft Q&A platform and posting your query. As I understand your query, you want to fetch the data from a file with today's date and copy the same to your destination datastore using ADF pipeline. Please let me know if my understanding is incorrect.
These are the steps you need to perform to achieve that:
1. Use GetMetadata activity pointing the dataset to the folder and using childItems in the field list to get the list of fileNames in that folder.
2. Use ForEach activity to iterate through each of the fileNames and pass this value as Item: @activity('Get Metadata1').output.childItems
3. Use If block inside ForEach with the following expression:
@equals(split(substring(item().name,add(indexof(item().name,'_'),1),add(lastIndexOf(item().name,'.'),-2)),'.')[0],formatdatetime(utcnow(),'dd_MM_yyyy'))
3. In the true condition of If block, add copy activity and use wildcard file path in the source dataset and provide fileName as @item().name
As you can see in the output , out of all the files present in the folder, only file with today's date got copied .
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators