This project sets up an end-to-end data pipeline that transforms and processes historical data from a SQL Database into a structured format in Azure Synapse Analytics, utilizing Azure Data Lake Storage (ADLS) and Delta Tables for efficient storage and querying.
Below is the architecture diagram showcasing how data flows through the different components:
- Python
- Azure SQL Database
- T-SQL (Transact-SQL)
- Azure Synapse Analytics
- Azure Data Lake Storage (ADLS)
- Azure Logic App
- Azure Notebook
- PySpark
- Delta Tables
- Pipeline Overview
- Prerequisites
- Project Structure
- How to Run
- Pipeline Activities
- Parameters
- Pipeline Steps
- Validation Checklist
- Summary of Flow
The data pipeline consists of the following activities:
For detailed activity descriptions, see Pipeline Activities.
The data pipeline consists of the following stages:
- Bronze Layer: Raw, unprocessed data directly coming from each table stored in the Azure SQL database. All these tables are stored in Parquet format in Azure Data Lake Storage (ADLS) for further processing.
- Silver Layer: Cleaned and transformed data stored as Delta Tables for optimized querying and performance.
- Gold Layer: The final, optimized dataset containing dimension and fact tables, designed for high-performance analytics and reporting.
Ensure the following services and tools are available before running this project:
- Azure SQL Database with a server and database where the
fintechschema can be created. - Azure Data Lake Storage (ADLS Gen2) with containers/folders for bronze, silver, and gold layers.
- Azure Synapse Analytics workspace with pipeline and notebook support.
- Apache Spark pool in Synapse for notebook execution.
- Azure Logic App configured to send email notifications for success/failure events.
- Permission access to create/edit SQL objects, Synapse pipelines/notebooks, and ADLS data paths.
Fintech_GitHub_Project/
├── assets/images/ # Architecture, pipeline, and notification screenshots
├── notebooks/
│ ├── BronzeToSilver_ETL.ipynb # ETL from raw parquet to delta (silver)
│ └── SilverToGold_ETL.ipynb # ETL from silver delta to analytics-ready gold
├── src/
│ ├── pipeline/pipeline_definition.json
│ └── utils/query_tables_list_for_lookup_activity.sql
├── sql/
│ ├── create_fintech_schema.sql
│ ├── Accounts/
│ ├── Customers/
│ ├── Loans/
│ ├── Payments/
│ └── Transactions/
└── README.md
Use this order to deploy and execute the full pipeline.
- Run
sql/create_fintech_schema.sql. - For each table folder under
sql/(Accounts,Customers,Loans,Payments,Transactions):- Run
create_table_<table_name>.sql. - Run
insert_records_<table_name>.sql.
- Run
- In ADLS, create (or confirm) bronze/silver/gold paths.
- Ensure Synapse has access to these storage paths.
- Use
src/pipeline/pipeline_definition.jsonin Synapse. - Confirm pipeline parameters in the Parameters section below.
- Import or attach
notebooks/BronzeToSilver_ETL.ipynb. - Import or attach
notebooks/SilverToGold_ETL.ipynb. - Ensure notebook activities are correctly referenced in the pipeline.
- Create/update Logic App endpoint(s) for success and failure notifications.
- Connect the corresponding Web activities in the pipeline.
- Trigger one manual run to validate the flow end-to-end.
- Configure a schedule trigger in Synapse for automated execution.
The pipeline includes the following main activities:
-
GetTableListFromSqlDatabase:
- A Lookup activity that queries the SQL database to retrieve a list of base tables from the
fintechschema. - View the SQL query configuration
- A Lookup activity that queries the SQL database to retrieve a list of base tables from the
-
CopyEachTableToBronzeLayer:
- A ForEach activity that iterates over the tables fetched in the previous step and copies each table from SQL to the Bronze layer in ADLS using the Copy activity.
- A ForEach activity that iterates over the tables fetched in the previous step and copies each table from SQL to the Bronze layer in ADLS using the Copy activity.
-
BronzeToSilver_ETL:
- A SynapseNotebook activity that processes the data in the Bronze layer and performs ETL transformations, storing the results in the Silver layer.
- View the Azure Notebook code
-
SilverToGold_ETL:
- A SynapseNotebook activity that further transforms the data from the Silver layer and writes the final dataset to the Gold layer.
- View the Azure Notebook code
-
PipelineSuccessNotification:
- The WebActivity sends an HTTP request to the Logic App upon pipeline success. The Logic App is configured to receive the request containing email details such as recipient, subject, and body, and send an email using Outlook.
Above: Logic App workflow triggered by the HTTP request from WebActivity.
- Logic App Workflow:
- Trigger: The Logic App is triggered by an HTTP request from the WebActivity within the pipeline.
- Action: Once triggered, the Logic App sends an email to the specified recipient, using the subject and body details defined in the request.
Above: Example of the email sent upon pipeline success.
- The WebActivity sends an HTTP request to the Logic App upon pipeline success. The Logic App is configured to receive the request containing email details such as recipient, subject, and body, and send an email using Outlook.
-
PipelineFailedNotification:
- Similarly, another WebActivity is used to send an email notification if the pipeline fails. This triggers a different Logic App workflow to notify the relevant recipients about the failure.
Above: Example of the email sent upon pipeline failure.
- Similarly, another WebActivity is used to send an email notification if the pipeline fails. This triggers a different Logic App workflow to notify the relevant recipients about the failure.
This pipeline includes the following parameters for customizable notifications:
- to: Email recipient.
- emailSubjectSuccess and emailBodySuccess: Customizable email subject and body for success notifications.
- emailSubjectFailed and emailBodyFailed: Customizable email subject and body for failure notifications.
These parameters help configure notification settings to keep stakeholders informed on pipeline status.
The following are the implementation details for each stage of the pipeline:
Create and structure a SQL database with tables containing historical data that will serve as the source for further processing. First, a schema named fintech is created within the SQL database, which includes the following tables:
- Accounts
- Customers
- Loans
- Payments
- Transactions
In the sql folder, each table has a dedicated subfolder containing the SQL files necessary for:
- Creating the table structure.
- Inserting initial records for testing and further processing.
Each subfolder includes create_table_<table_name>.sql and insert_records_<table_name>.sql files for its respective table.
The pipeline configuration is available in the pipeline_definition.json file.
Set up a dynamic data pipeline in Azure Synapse to move data from the SQL Database to the Bronze Layer in Azure Data Lake Storage (ADLS). Refer to the Pipeline Activities and Parameters sections for details on each pipeline activity and parameter.
The Bronze Layer handles raw data storage for further transformations. Each table from the SQL database is stored in Parquet format under the following structure:
bronze/
└── fintech/
└── <table_name>/
└── parquet files
Create and configure a PySpark notebook to read the raw data from the Bronze Layer and transform it into a more refined format, which is then written into the Silver Layer as Delta Tables.
The Silver layer structure is organized as follows:
silver/
└── fintech/
└── <table_name>/
└── delta files
Develop and configure another PySpark notebook to read the transformed data from the Silver Layer, apply further processing, and write the final, optimized dataset into the Gold Layer as Delta Tables for high-quality data.
The Gold layer structure is organized as follows:
gold/
└── fintech/
└── <table_name>/
└── delta files
Add WebActivity steps in the pipeline to send email notifications via Logic Apps to monitor pipeline success and failure:
-
PipelineSuccessNotification: Set up a WebActivity to trigger a Logic App that sends an email notification upon successful pipeline completion.
-
PipelineFailedNotification: Set up another WebActivity to trigger a Logic App that sends an email notification if the pipeline fails.
Enable an automation setup within Azure Synapse Analytics to schedule the existing pipeline. This configuration allows all pipeline activities - from data extraction and transformation to notifications - to run automatically and sequentially, ensuring smooth end-to-end data processing.
After running the pipeline, verify the following outcomes:
- Lookup + copy stage succeeds and all source tables are landed in bronze as parquet.
- Bronze to silver notebook succeeds and delta tables are created in the silver layer.
- Silver to gold notebook succeeds and curated dimension/fact outputs exist in the gold layer.
- Pipeline notifications work: success emails on successful run, failure emails on failed run.
- Pipeline history is clean in Synapse monitor (no unresolved failed activity in the latest run).
- Data sanity checks pass (for example: non-empty outputs and expected table counts per layer).
- Data Retrieval: The pipeline starts by fetching table names from the SQL database.
- Data Migration to Bronze: The tables are copied to the Bronze layer in ADLS.
- ETL Processes: Data is transformed in the Bronze layer, moved to the Silver layer, and then to the Gold layer.
- Notification: The pipeline sends email notifications based on the success or failure of the pipeline execution.
This setup ensures that data moves seamlessly from SQL to ADLS, undergoes transformation, and finishes with a notification of success or failure.



