Azure Data Factory (ADF) - Class Notes
Real-Time Use Case: Sales Data Load Pipeline
Scenario:
A retail company receives daily sales data from various branches as CSV files in an Azure Blob Storage
container.
These files need to be processed and loaded into an Azure SQL Database for reporting purposes.
ADF Pipeline Flow
1. Trigger:
- Schedule trigger runs the pipeline every night at 2 AM.
2. Activities:
- Get Metadata Activity:
Fetches file names from Blob Storage.
- ForEach Activity:
Iterates over each file returned by the metadata activity.
- Copy Activity (inside ForEach):
Source: CSV file from Blob
Sink: Azure SQL Sales table
- Stored Procedure Activity (optional):
Azure Data Factory (ADF) - Class Notes
Calls a procedure to validate and summarize data post-load.
3. Monitoring:
- Check the pipeline run status and performance in ADF Monitor.
Pipeline Design Tips
- Use parameterized datasets for dynamic file names and paths.
- Use logging tables in SQL DB to record successful/failed loads.
- Implement error handling using the Web Activity or Fail Activity.