Share via

How to merge daily csv files into monthly csv files on the same storage account using Azure Data Factory efficiently

Umberto Ortolan 5 Reputation points
2023-06-13T19:59:52.31+00:00

Sorry if the question seams obvious. I am new to ADF. I have read many forum questions but am still struggling to find an efficient solution.

My storage account has two containers: daily and monthly.

Inside the containers I have the same group of directories: reportA, reportB, reportC,...

Inside each directory for the daily container I have multiple files with daily information =>

daily/reportA has many daily files called 20230101.csv, ..., 20230612.csv

daily/reportB has many daily files called 20230601.csv, ..., 20230612.csv

...

Inside each directory for the monthly container I have a file with monthly information =>

monthly/reportA has many monthly files called 202301.csv, ..., 202306.csv

monthly/reportB has many monthly files called 202301.csv, ..., 202306.csv

...

Every day I generate a new daily file for each report and would like to create monthly files, merging all daily files from a given month. On the daily activity only the current month has to be aggregated.

Sometimes (low frequency) I need to reprocess some of the reports, so new daily reports are extracted for the whole period and multiple monthly files need to be created.

Is ADF capable of performing this task on a simple way.

Thanks a lot for the support.

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


2 answers

Sort by: Most helpful
  1. Umberto Ortolan 5 Reputation points
    2023-06-14T19:32:41.0733333+00:00

    Hope the image helps.User's image

    My current solution is fixed for the current month. Date is detected and ForEach is used with fixed Directory Array.

    It does not cover the scenario where a file on previous months is updated.

    User's image

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. QuantumCache 20,681 Reputation points Moderator
    2023-06-14T16:38:46.74+00:00

    Hello @Umberto Ortolan,
    Did you try the Copy Behavior as Merge?

    User's image

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.