Hello @Anuganti Suresh,
Thanks for using Microsoft Q&A .
You should use the delete activity to achieve this. You will have to create the path dynamically (2023/2/1/*) and pass that as the path in the activity.
https://learn.microsoft.com/en-us/azure/data-factory/delete-activity . You will also have to use the data and time function to get yesterdays date and then get the Year , month and day from that .
https://learn.microsoft.com/en-us/azure/data-factory/data-flow-date-time-functions
Thanks
Himanshu
How to delete previous day files in container once pipeline successful in ADF?
Anuganti Suresh
200
Reputation points
I have container name input and folder path as yyyy/MM/DD. Currently i have folder structure like 2024 and inside that 2(FEB) and inside that has day wise folders 1, 2, 3, 4, 5 etc. I have pipeline (data ingestion & transformation) and runs on daily basis. On particular day once pipeline completed wants to delete previous source file in container. How to achieve this scenario?
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,667 questions
2 answers
Sort by: Most helpful
-
HimanshuSinha-msft 19,491 Reputation points Microsoft Employee Moderator
2024-02-29T22:44:07.5533333+00:00 -
Anuganti Suresh 200 Reputation points
2024-03-02T12:43:53.26+00:00 Below solution solved my query.