Hi @Kia ,
Welcome to Microsoft Q&A Platform. Thanks for posting the query.
I have implemented it till year and month level and same can be extended to dates in the data. I have used couple of stored procedures in on-premise SQL as below
- dbo.getmonths with input year parameter to retrieve months for the specific year from the table
- dbo.getdata with input year and month parameters to retrieve data for specific month and year from the table
Design includes following components
- Lookup - to retrieve list of years and months from the table, this can be added for days as well
- Foreach activity - to loop through years/months based on lookup output
- Execute Pipeline - Since foreach inside foreach is not supported in azure data factory, implemented the copy activity in child pipeline with input parameter as year. If extended to days, the input parameters can be both year and month
- Copy Activity - This activity is used to load the data from the SQL to blob with dynamic folders using month and year
Below GIF shares the details on implementation. Also, attached the json of pipelines to this.
31625-parentpipelinejson.txt
31626-childpipelinejson.txt
Hope this helps! Please let us know if it does not align with the requirement or for further queries and we will be glad to assist.