# pablofdez/etl_datawarehouse architecture

> Architecture diagram of the GitHub repository pablofdez/etl_datawarehouse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pablofdez/etl_datawarehouse
- Repository: https://github.com/pablofdez/etl_datawarehouse

## Overview

- SSIS_Part1 – Data Preparation
- SSIS_Extract – Data Extraction
- SSIS_DW – Data Transformation and Loading

##### Main Components
c. Data Extraction (SSIS_Extract) – This component contains the SSIS packages responsible for extracting data from the source database(s). Represent this layer separately, ensuring you include the different solution files and the bin (Development) components which indicate deployment stages.
d. Data Transformation and Loading (SSIS_DW) – This component includes most of the transformation logic, with a variety of SSIS packages (e.g., Customer.dtsx, OrderInfo.dtsx, Promotion.dtsx, etc.) and scripts (like TruncateTables.sql). This phase loads transformed data into the targeted data warehouse databases.
e. Additional Files/Memos – Although not an ETL component per se, the provided memo and final structure image should be referenced (or optionally attached) to give context to process details and business rules.

##### Relationships and Interactions
– From external data sources (AdventureWorks2012) into the Data Preparation phase.
– From Data Preparation (SSIS_Part1) to Data Extraction (SSIS_Extract) – indicating preparation and extraction.
– From Data Extraction to Data Transformation and Loading (SSIS_DW) – showing subsequent transformation and loading into the target databases.
- Connections between SSIS packages and the specific databases they interact with.
- Required connection types (Native OLE DB vs. .NET Provider) by annotating the connection points, based on the connection table provided in the README.

##### Architectural Patterns and Key Technologies
- That the project follows a classic ETL pipeline pattern:
– Extract → Transform → Load.
- Each phase is modularly separated into distinct SSIS solutions/folders.
- Patterns such as batch processing (all packages appear to be run together, as indicated by “RUN THIS TO LOAD ALL.dtsx” scripts) and data truncation/refresh workflows (evidenced by TruncateTables.sql).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Data Sources"
        DS1["AdventureWorks2012"]:::source
        TB1["MDWT_2008R2"]:::db
        TB2["MDWT_2008R2_Stage"]:::db
        TB3["MDWT_2008R2_Extract"]:::db
    end

    subgraph "SSIS_Part1 - Data Preparation"
        DP["SSIS_Part1 - Data Preparation"]:::ssis
        FERC["FERCurrency.dtsx"]:::ssis
        FERP["FERProduct.dtsx"]:::ssis
    end

    subgraph "SSIS_Extract - Data Extraction"
        DE["SSIS_Extract - Data Extraction"]:::ssis
        subgraph "MDWT_AdventureWorks_SSIS"
            E1["Extraction Packages"]:::ssis
            DEV["bin/Development"]:::ssis
        end
    end

    subgraph "SSIS_DW - Transformation/Loading"
        DW["SSIS_DW - Transformation/Loading"]:::ssis
        Cust["Customer.dtsx"]:::ssis
        Order["OrderInfo.dtsx"]:::ssis
        Promo["Promotion.dtsx"]:::ssis
        Trunc["TruncateTables.sql"]:::ssis
        subgraph "Backup"
            Bkup["Backup Packages"]:::ssis
        end
    end

    subgraph "Additional Documentation"
        Memo["ETL_memo.pdf"]:::file
        Readme["README.md"]:::file
    end

    %% Data Flow
    DS1 -->|"source-to-prep"| DP
    DP -->|"prep-to-extraction"| DE
    DE -->|"extraction-to-transformation"| DW
    DW -->|"load-to-targets"| TB1
    DW -->|"load-to-targets"| TB2
    DW -->|"load-to-targets"| TB3

    %% Internal Component Relationships
    DP --> FERC
    DP --> FERP
    DE --> E1
    E1 --> DEV
    DW --> Cust
    DW --> Order
    DW --> Promo
    DW --> Trunc

    %% Click Events
    click DP "https://github.com/pablofdez/etl_datawarehouse/tree/master/SSIS_Part1/SSISPart1"
    click FERC "https://github.com/pablofdez/etl_datawarehouse/blob/master/SSIS_Part1/SSISPart1/FERCurrency.dtsx"
    click FERP "https://github.com/pablofdez/etl_datawarehouse/blob/master/SSIS_Part1/SSISPart1/FERProduct.dtsx"
    click DE "https://github.com/pablofdez/etl_datawarehouse/tree/master/SSIS_Extract/MDWT2008"
    click DW "https://github.com/pablofdez/etl_datawarehouse/tree/master/SSIS_DW"
    click Memo "https://github.com/pablofdez/etl_datawarehouse/blob/master/Additional Files/ETL_memo.pdf"
    click Readme "https://github.com/pablofdez/etl_datawarehouse/blob/master/README.md"

    %% Styles
    classDef db fill:#AEDFF7,stroke:#1F77B4,stroke-width:2px;
    classDef ssis fill:#C6E2FF,stroke:#4682B4,stroke-width:2px;
    classDef file fill:#FFF2CC,stroke:#E1C699,stroke-width:2px;
    classDef source fill:#D5F5E3,stroke:#28B463,stroke-width:2px;

    class DS1 source;
    class TB1,TB2,TB3 db;
    class DP,FERC,FERP,DE,E1,DEV,DW,Cust,Order,Promo,Trunc,Bkup ssis;
    class Memo,Readme file;
```
