Copy csv data from Blob Storage subfolders to SQL

Techie 0 Reputation points
2023-06-06T02:04:20.38+00:00

Hello all, I am new to Azure Data Factory. Please guide me through the following scenario:

I have a container in a storage account. Inside the container, I have multiple folders and subfolders.

For example:

Container-->Model (Multiple Folders) -->Vendor(Multiple Folders)-->ReportAccounts(Multiple Folders)-->Types(Multiple Folders)-->Client(Multiple Folders)-->Year(Multiple Folders)-->Month(Multiple Folders)-->.csv

So there will be a new file every day in Month Folder for all Models.

All I want is, when a new file is added in the folder, copy data from each subfolder and store the data in the SQL table.

I have already created tables for each Model in SQL.

Thanks in advance

Azure SQL Database
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,556 Reputation points Microsoft Employee Moderator
    2023-06-08T10:30:22.49+00:00

    Hi Techie,

    Thank you for posting query in Microsoft Q&A Platform.

    You mean to say when a file added in Month folder then automatically copy that file data to destination tables? Please confirm.

    If yes, you can consider using even based triggers to achieve this. Event based triggers helps to run pipeline when any blob created or deleted based on configurations.

    Please check below documentation and video to understand it better.

    Create a trigger that runs a pipeline in response to a storage event

    Event based Triggers in Azure Data Factory

    Hope this helps. Please let me know how it goes or if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well.


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.