# dhaayor/end-to-end-data-analysis-project-sql-to-power-bi architecture

> Architecture diagram of the GitHub repository dhaayor/end-to-end-data-analysis-project-sql-to-power-bi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dhaayor/end-to-end-data-analysis-project-sql-to-power-bi
- Repository: https://github.com/dhaayor/end-to-end-data-analysis-project-sql-to-power-bi

## Overview

##### Project Type and Purpose
- This is a data‐analysis pipeline that ingests raw CSVs, performs SQL‐based ETL and analytics, then drives interactive visualizations in Power BI.
- The goal is to answer budget‐variance, project performance, and employee‐distribution questions.

##### (Minimal) File Structure
- README.md
- SQL scripts (inferred folder: `sql_queries/`)
- Source CSVs (e.g., `employees.csv`, `projects.csv`, etc.)
- Power BI file (`.pbix`)

##### Main Components
a. Data Sources Layer
- CSV files: `completed_projects`, `departments`, `employees`, `Head_Shots`, `project_assignments`, `projects`, `upcoming_projects`
b. Ingestion & Staging Layer
- CSV import into a SQL database (e.g., SQL Server, PostgreSQL)
c. Transformation & Analytics Layer
- SQL scripts/queries using JOINs, CTEs, aggregations
- Derived tables/views for budget variance, performance metrics
d. Reporting Layer
- Power BI Desktop: `.pbix` project connecting to the SQL database
- Data model relationships inside Power BI
e. End‐User Layer
- Interactive dashboards, slicers, visual elements

##### Relationships and Data Flows
- From Analytics Views → Power BI connector.
- Finally, from Power BI → End‐Users (via dashboards).

##### Architectural Patterns & Principles
- Layered pipeline: Source → Staging → Transformation → Presentation
- Separation of concerns: ETL logic lives in SQL, visualization logic in Power BI
- Reusability: SQL scripts generate views that can be repurposed for new reports
- Extensibility: New CSVs or analytical queries can be plugged into the existing pipeline

##### Technologies & Frameworks
- SQL Database (specify engine: e.g., SQL Server)
- SQL queries and scripts (in `sql_queries/` directory)
- Power BI Desktop (`.pbix` file)
- CSV file storage (flat files in repo or a cloud blob store)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Doc["Project Documentation (README.md)"]:::doc
    subgraph "Data Sources"
        CP["completed_projects.csv"]:::dataSource
        DEPT["departments.csv"]:::dataSource
        EMPL["employees.csv"]:::dataSource
        HS["Head_Shots.csv"]:::dataSource
        PA["project_assignments.csv"]:::dataSource
        PROJ["projects.csv"]:::dataSource
        UP["upcoming_projects.csv"]:::dataSource
    end
    Staging["Staging Tables"]:::database
    Analytics["Analytics Views/Tables (SQL CTEs, JOINs, Aggregations)"]:::database
    PBIDB["Power BI Data Model (.pbix)"]:::process
    Dash["Interactive Dashboards (Power BI)"]:::bi
    Users["End Users"]:::user

    Doc --> CP
    Doc --> DEPT
    Doc --> EMPL
    CP --> Staging
    DEPT --> Staging
    EMPL --> Staging
    HS --> Staging
    PA --> Staging
    PROJ --> Staging
    UP --> Staging
    Staging --> Analytics
    Analytics --> PBIDB
    PBIDB --> Dash
    Dash --> Users

    click Doc "https://github.com/dhaayor/end-to-end-data-analysis-project-sql-to-power-bi/blob/main/README.md"

    classDef dataSource fill:#f9f,stroke:#333,stroke-width:1px
    classDef database fill:#bbf,stroke:#333,stroke-width:1px
    classDef process fill:#bfb,stroke:#333,stroke-width:1px
    classDef bi fill:#fbf,stroke:#333,stroke-width:1px
    classDef user fill:#ffb,stroke:#333,stroke-width:1px
    classDef doc fill:#ffd,stroke:#333,stroke-width:1px
```
