# andrerd1026/ss2_202010816 architecture

> Architecture diagram of the GitHub repository andrerd1026/ss2_202010816, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andrerd1026/ss2_202010816
- Repository: https://github.com/andrerd1026/ss2_202010816

## Overview

1. **Repository shape**
   - This repo is not a single application; it contains **two practice exercises** and a **larger BI/data-warehouse project**.
   - The main architectural boundary is between **analytical/data-processing work** and **reporting/visualization deliverables**.

2. **Practica 1: database querying exercise**
   - `Practica1/` centers on a dataset about **tsunamis**: `historial_tsumamis.csv`.
   - It includes a Python script (`Practica1.py`) plus paired SQL and text query artifacts:
     - `SQL/Aplicacion`: model lifecycle scripts (`Crear_modelo`, `Cargar_informacion`, `Extraer_informacion`, `Borrar_modelo`).
     - `SQL/Consultas` and `Consultas/Consulta_*.txt`: ten queries, likely the SQL logic and its documented results or descriptions.
   - Architecturally, this is a **local data-processing / relational querying workflow** around one CSV source and one database model.

3. **Practica 2: notebook-based analysis**
   - `Practica2/Practica2.ipynb` with `datos.csv` is a separate **exploratory analysis / notebook** workflow.
   - There is no visible backend service or deployment target; the notebook is the main execution boundary, with the CSV as its input.

4. **Proyecto: overall intent**
   - `Proyecto/` is a **business intelligence solution** split into two phases:
     - **Fase 1**: data ingestion and warehouse foundation.
     - **Fase 2**: analytical model, dashboards, and reports.
   - The structure strongly suggests a Microsoft stack built with **SSIS / SQL Server / SSAS / SSRS / Power BI**.

5. **Fase 1: source ingestion and warehouse creation**
   - `ArchivosEntradaSG/` contains the operational input files:
     - `.comp` files for **compras** and `.vent` files for **ventas**.
   - `Scripts/` contains SQL for:
     - `Base1.sql`, `Base2.sql`: base/source databases.
     - `DataWarehouse.sql`: warehouse schema.
   - `ProyectoFase1/ProyectoFase1/Package.dtsx` indicates an **SSIS package** used to move data from files into the database layer.
   - This phase is the **ETL boundary**: flat files → database staging/source → data warehouse.

6. **Fase 1 model documentation**
   - `Modelo/ModeloDataWarehouse.pdf` and `Documentacion/` show that the warehouse structure was designed and documented explicitly.
   - This is important for diagramming because the warehouse is not just code; it is a **modeled analytical store** with documented schema assumptions.

7. **Fase 2: analytical semantic layer**
   - `ProyectoFase2/` contains `.dim`, `.cube`, `.dsv`, and `.partitions` files, which points to an **SSAS multidimensional model**.
   - There are paired subject areas for **Compra** and **Venta**, each with dimensions such as:
     - `Fecha`, `Producto`, `Sucursal`, `Geografia`, `Departamento`, `Categoria`
   - Shared dimensions also exist:
     - `Cliente`, `Proveedor`, `Vendedor`
   - The architecture here is a classic **dimension/fact analytical layer** built on top of the warehouse.

8. **Data source views and cube partitions**
   - `Vista_Compra.dsv`, `Vista_Venta.dsv`, and `ProyectoFase2.dsv` define the **logical source layer** used by the cubes.
   - `Cubo_Compra.cube` and `Cubo_Venta.cube` with `.partitions` indicate the analytical data is split into cube partitions, likely for performance and manageability.
   - For a diagram, this is the layer between the relational warehouse and the BI consumers.

9. **BI dashboards**
   - `ProyectoFase2_BI/` contains two Power BI files:
     - `Dashboard_Compra.pbix`
     - `Dashboard_Venta.pbix`
   - These are the visual consumption layer for business users, likely reading from the warehouse/semantic model rather than raw files.

10. **Reporting Services layer**
   - `ProyectoFase2_RS/` contains multiple `.rdl` report definitions for both compra and venta.
   - This is a separate **reporting delivery channel** from Power BI, meaning the project supports both:
     - interactive dashboards
     - formal paginated reports
   - In the architecture, RS sits on the same analytical data foundation but serves a different presentation use case.

11. **Build/deployment artifacts**
   - `bin`, `obj`, `.sln`, `.dtproj`, `.dwproj`, `.rptproj`, `.database`, and related generated files show this repo is built through **Visual Studio project systems** rather than a general-purpose runtime.
   - Deployment artifacts like `.ispac`, `.asdatabase`, and `.configsettings` confirm packaged deployment of ETL/SSAS components.

12. **Main end-to-end flow**
   - The most important data path in the repo is:
     - **flat files in Fase 1** → **ETL package** → **SQL base/warehouse** → **SSAS dimensions/cubes** → **Power BI dashboards and SSRS reports**
   - The earlier practice folders are isolated exercises and do not appear to feed the main project.

13. **How to draw the architecture**
   - Use three clearly separated zones:
     - **Exercises**: Practica1 and Practica2, each self-contained.
     - **Warehouse pipeline**: input files, SQL scripts, SSIS package, warehouse database.
     - **Analytics/presentation**: SSAS cubes/dimensions, Power BI, SSRS.
   - The dominant boundary is between **data ingestion/storage** and **analytical consumption**.

Main entry points: [`Proyecto/Fase1/ProyectoFase1/ProyectoFase1/ProyectoFase1.database`](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/ProyectoFase1/ProyectoFase1/ProyectoFase1.database) (Data Warehouse), [`Proyecto/Fase2/ProyectoFase2/ProyectoFase2/Cubo_Compra.cube`](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2/ProyectoFase2/Cubo_Compra.cube) (Cubes), [`Practica1/historial_tsumamis.csv`](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/historial_tsumamis.csv) (Tsunami CSV), [`Practica1/SQL/Aplicacion/Crear_modelo.sql`](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/SQL/Aplicacion/Crear_modelo.sql) (DB Lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_exercises["Exercises"]
  node_p1_csv["Tsunami CSV<br/>csv source"]
  node_p1_script["Query Script<br/>python workflow<br/>[Practica1.py]"]
  node_p1_sql_app["DB Lifecycle<br/>sql app scripts<br/>[Crear_modelo.sql]"]
  node_p1_sql_queries["SQL Queries<br/>[CONSULTA1.sql]"]
  node_p1_docs["Query Notes<br/>exercise docs<br/>[Consulta_1.txt]"]
  node_p2_csv["Analysis CSV<br/>csv source<br/>[datos.csv]"]
  node_p2_nb["Notebook<br/>[Practica2.ipynb]"]
end

subgraph group_warehouse["Warehouse pipeline"]
  node_f1_inputs["Input Files<br/>flat files<br/>[SGFood01.comp]"]
  node_f1_etl["ETL Package<br/>ssis package<br/>[Package.dtsx]"]
  node_f1_scripts["SQL Scripts<br/>db setup scripts<br/>[DataWarehouse.sql]"]
  node_f1_dw[("Data Warehouse<br/>relational warehouse")]
  node_f1_model["DW Model<br/>warehouse design"]
end

subgraph group_analytics["Analytics and delivery"]
  node_f2_dsv["Source Views<br/>ssas dsv<br/>[ProyectoFase2.dsv]"]
  node_f2_dims["Dimensions<br/>[Fecha_Compra.dim]"]
  node_f2_cubes{{"Cubes<br/>[Cubo_Compra.cube]"}}
  node_f2_powerbi["Power BI<br/>dashboards"]
  node_f2_rs["SSRS Reports<br/>paginated reports"]
end

node_p1_csv -->|"analyzed by"| node_p1_script
node_p1_csv -->|"loaded by"| node_p1_sql_app
node_p1_sql_app -->|"enables"| node_p1_sql_queries
node_p1_sql_queries -->|"documented in"| node_p1_docs
node_p2_csv -->|"explored in"| node_p2_nb
node_f1_inputs -->|"ingested by"| node_f1_etl
node_f1_scripts -->|"creates"| node_f1_dw
node_f1_etl -->|"loads"| node_f1_dw
node_f1_model -->|"documents"| node_f1_dw
node_f1_dw -->|"exposed through"| node_f2_dsv
node_f2_dsv -->|"shapes"| node_f2_dims
node_f2_dims -->|"feeds"| node_f2_cubes
node_f1_dw -->|"underlies"| node_f2_cubes
node_f2_cubes -->|"consumed by"| node_f2_powerbi
node_f2_cubes -->|"reported by"| node_f2_rs

click node_p1_csv "https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/historial_tsumamis.csv"
click node_p1_script "https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/Practica1.py"
click node_p1_sql_app "https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/SQL/Aplicacion/Crear_modelo.sql"
click node_p1_sql_queries "https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/SQL/Consultas/CONSULTA1.sql"
click node_p1_docs "https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/Consultas/Consulta_1.txt"
click node_p2_csv "https://github.com/andrerd1026/ss2_202010816/blob/main/Practica2/datos.csv"
click node_p2_nb "https://github.com/andrerd1026/ss2_202010816/blob/main/Practica2/Practica2.ipynb"
click node_f1_inputs "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/ArchivosEntradaSG/SGFood01.comp"
click node_f1_etl "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/ProyectoFase1/ProyectoFase1/Package.dtsx"
click node_f1_scripts "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/Scripts/DataWarehouse.sql"
click node_f1_dw "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/ProyectoFase1/ProyectoFase1/ProyectoFase1.database"
click node_f1_model "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/Modelo/ModeloDataWarehouse.pdf"
click node_f2_dsv "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2/ProyectoFase2/ProyectoFase2.dsv"
click node_f2_dims "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2/ProyectoFase2/Fecha_Compra.dim"
click node_f2_cubes "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2/ProyectoFase2/Cubo_Compra.cube"
click node_f2_powerbi "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2_BI/Dashboard_Compra.pbix"
click node_f2_rs "https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2_RS/ProyectoFase2_RS/Compra_Reporte1.rdl"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_p1_csv,node_p1_script,node_p1_sql_app,node_p1_sql_queries,node_p1_docs,node_p2_csv,node_p2_nb toneBlue
class node_f1_inputs,node_f1_etl,node_f1_scripts,node_f1_dw,node_f1_model toneAmber
class node_f2_dsv,node_f2_dims,node_f2_cubes,node_f2_powerbi,node_f2_rs toneMint
```

## Components

### Exercises

Self-contained practice assignments

- [Tsunami CSV](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/historial_tsumamis.csv): csv source · Local dataset for Practica 1 · `Practica1/historial_tsumamis.csv`
- [Query Script](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/Practica1.py): python workflow · Main procedural exercise driver · `Practica1/Practica1.py`
- [DB Lifecycle](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/SQL/Aplicacion/Crear_modelo.sql): sql app scripts · Create, load, extract, and drop model scripts · `Practica1/SQL/Aplicacion/Crear_modelo.sql`
- [SQL Queries](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/SQL/Consultas/CONSULTA1.sql): sql queries · Ten relational query definitions · `Practica1/SQL/Consultas/CONSULTA1.sql`
- [Query Notes](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica1/Consultas/Consulta_1.txt): exercise docs · Documented query results and explanations · `Practica1/Consultas/Consulta_1.txt`
- [Analysis CSV](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica2/datos.csv): csv source · Input data for notebook analysis · `Practica2/datos.csv`
- [Notebook](https://github.com/andrerd1026/ss2_202010816/blob/main/Practica2/Practica2.ipynb): notebook analysis · Interactive exploratory analysis boundary · `Practica2/Practica2.ipynb`

### Warehouse pipeline

ETL and relational foundation for the main project

- [Input Files](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/ArchivosEntradaSG/SGFood01.comp): flat files · Operational compra and venta files · `Proyecto/Fase1/ArchivosEntradaSG/SGFood01.comp`
- [ETL Package](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/ProyectoFase1/ProyectoFase1/Package.dtsx): ssis package · Moves flat files into the database layer · `Proyecto/Fase1/ProyectoFase1/ProyectoFase1/Package.dtsx`
- [SQL Scripts](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/Scripts/DataWarehouse.sql): db setup scripts · Source and warehouse schema creation · `Proyecto/Fase1/Scripts/DataWarehouse.sql`
- [Data Warehouse](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/ProyectoFase1/ProyectoFase1/ProyectoFase1.database): relational warehouse · Modeled analytical storage layer · `Proyecto/Fase1/ProyectoFase1/ProyectoFase1/ProyectoFase1.database`
- [DW Model](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase1/Modelo/ModeloDataWarehouse.pdf): warehouse design · Documented warehouse model and assumptions · `Proyecto/Fase1/Modelo/ModeloDataWarehouse.pdf`

### Analytics and delivery

Semantic model and end-user reporting

- [Source Views](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2/ProyectoFase2/ProyectoFase2.dsv): ssas dsv · Logical relational views for cube builds · `Proyecto/Fase2/ProyectoFase2/ProyectoFase2/ProyectoFase2.dsv`
- [Dimensions](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2/ProyectoFase2/Fecha_Compra.dim): ssas dimensions · Compra, venta, and shared analytical dimensions · `Proyecto/Fase2/ProyectoFase2/ProyectoFase2/Fecha_Compra.dim`
- [Cubes](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2/ProyectoFase2/Cubo_Compra.cube): ssas cubes · Compra and venta multidimensional cubes · `Proyecto/Fase2/ProyectoFase2/ProyectoFase2/Cubo_Compra.cube`
- [Power BI](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2_BI/Dashboard_Compra.pbix): dashboards · Interactive business dashboards · `Proyecto/Fase2/ProyectoFase2_BI/Dashboard_Compra.pbix`
- [SSRS Reports](https://github.com/andrerd1026/ss2_202010816/blob/main/Proyecto/Fase2/ProyectoFase2_RS/ProyectoFase2_RS/Compra_Reporte1.rdl): paginated reports · Formal report delivery for compra and venta · `Proyecto/Fase2/ProyectoFase2_RS/ProyectoFase2_RS/Compra_Reporte1.rdl`

## Connections

- Tsunami CSV → Query Script: analyzed by · The tsunami dataset is processed in the Python exercise
- Tsunami CSV → DB Lifecycle: loaded by · Database lifecycle scripts ingest the local source
- DB Lifecycle → SQL Queries: enables · Created model is queried through the exercise SQL set
- SQL Queries → Query Notes: documented in · Query outputs and notes are paired
- Analysis CSV → Notebook: explored in · Notebook performs the analysis on the CSV
- Input Files → ETL Package: ingested by · Operational files feed the SSIS package
- SQL Scripts → Data Warehouse: creates · SQL scripts define the warehouse and source databases
- ETL Package → Data Warehouse: loads · ETL package populates the warehouse layer
- DW Model → Data Warehouse: documents · The warehouse design is explicitly modeled and documented
- Data Warehouse → Source Views: exposed through · Warehouse tables are surfaced as logical source views
- Source Views → Dimensions: shapes · Dimensions are built from the logical source layer
- Dimensions → Cubes: feeds · Cube structures are built from dimensional model assets
- Data Warehouse → Cubes: underlies · The warehouse is the relational foundation for the cubes
- Cubes → Power BI: consumed by · Power BI dashboards present the analytical results
- Cubes → SSRS Reports: reported by · SSRS reports read from the same analytical foundation
