# skoga02/marathos_julius_falt_skoglund architecture

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

- Interactive diagram: https://gitdiagram.com/skoga02/marathos_julius_falt_skoglund
- Repository: https://github.com/skoga02/marathos_julius_falt_skoglund

## Overview

This repository defines a Databricks/PySpark marathon-results analytics pipeline: stream race data into a Bronze table, clean and standardize it in Silver, then organize Gold outputs as dimensions, a fact table, and distance/time marts. The sampled Silver code reads Bronze and uses a shared column-renaming utility; the tree identifies the Gold model files but their SQL was not sampled. The archived Silver implementation is retained as a distinct legacy component. The supplied README gives no further product details, so Gold-stage connections are shown as unverified.

Main entry points: [`marathos_julius_laboration/transformations/silver/marathos_silver_obt_2.0.py`](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/silver/marathos_silver_obt_2.0.py) (Cleaned results), [`marathos_julius_laboration/transformations/bronze/raw_supply_chain.py`](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/bronze/raw_supply_chain.py) (Raw supply chain), [`marathos_julius_laboration/utilities/utils.py`](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/utilities/utils.py) (Column renaming), [`marathos_julius_laboration/arcive/marathos_silver_obt.py`](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/arcive/marathos_silver_obt.py) (Legacy cleaner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Bronze ingestion"]
  node_bronze[("Raw supply chain")]
end

subgraph group_clean["Silver cleaning"]
  node_silver_current[("Cleaned results")]
  node_silver_legacy[("Legacy cleaner")]
end

subgraph group_analytics["Gold analytics"]
  node_gold_dimensions["Athlete and event dimensions"]
  node_gold_fact["Results fact<br/>[fct_results.sql]"]
  node_gold_distance["Distance mart"]
  node_gold_time["Time-events mart"]
end

subgraph group_shared["Shared utilities"]
  node_utilities["Column renaming<br/>[utils.py]"]
end

node_race_csv["Race CSV data"]

node_race_csv -->|"loads CSV"| node_bronze
node_bronze -->|"reads stream"| node_silver_current
node_utilities -->|"renames columns"| node_silver_current
node_bronze -->|"reads stream"| node_silver_legacy
node_utilities -->|"renames columns"| node_silver_legacy
node_silver_current -.->|"feeds models"| node_gold_dimensions
node_silver_current -.->|"feeds model"| node_gold_fact
node_silver_current -.->|"feeds mart"| node_gold_distance
node_silver_current -.->|"feeds mart"| node_gold_time

click node_bronze "https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/bronze/raw_supply_chain.py"
click node_silver_current "https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/silver/marathos_silver_obt_2.0.py"
click node_silver_legacy "https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/arcive/marathos_silver_obt.py"
click node_utilities "https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/utilities/utils.py"
click node_gold_dimensions "https://github.com/skoga02/marathos_julius_falt_skoglund/tree/main/marathos_julius_laboration/transformations/gold"
click node_gold_fact "https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/gold/fct_results.sql"
click node_gold_distance "https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/gold/mart_distance_events.sql"
click node_gold_time "https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/gold/mart_time_events.sql"

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_bronze toneBlue
class node_silver_current,node_silver_legacy toneAmber
class node_gold_dimensions,node_gold_fact,node_gold_distance,node_gold_time toneMint
class node_utilities toneRose
class node_race_csv toneIndigo
```

## Components

### Bronze ingestion

- [Raw supply chain](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/bronze/raw_supply_chain.py): `marathos_julius_laboration/transformations/bronze/raw_supply_chain.py`

### Silver cleaning

- [Cleaned results](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/silver/marathos_silver_obt_2.0.py): `marathos_julius_laboration/transformations/silver/marathos_silver_obt_2.0.py`
- [Legacy cleaner](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/arcive/marathos_silver_obt.py): `marathos_julius_laboration/arcive/marathos_silver_obt.py`

### Gold analytics

- [Athlete and event dimensions](https://github.com/skoga02/marathos_julius_falt_skoglund/tree/main/marathos_julius_laboration/transformations/gold): `marathos_julius_laboration/transformations/gold`
- [Results fact](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/gold/fct_results.sql): `marathos_julius_laboration/transformations/gold/fct_results.sql`
- [Distance mart](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/gold/mart_distance_events.sql): `marathos_julius_laboration/transformations/gold/mart_distance_events.sql`
- [Time-events mart](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/transformations/gold/mart_time_events.sql): `marathos_julius_laboration/transformations/gold/mart_time_events.sql`

### Shared utilities

- [Column renaming](https://github.com/skoga02/marathos_julius_falt_skoglund/blob/main/marathos_julius_laboration/utilities/utils.py): `marathos_julius_laboration/utilities/utils.py`

### Other components

- **Race CSV data**

## Connections

- Race CSV data → Raw supply chain: loads CSV (evidence: `marathos_julius_laboration/transformations/bronze/raw_supply_chain.py`)
- Raw supply chain → Cleaned results: reads stream (evidence: `marathos_julius_laboration/transformations/silver/marathos_silver_obt_2.0.py`)
- Column renaming → Cleaned results: renames columns (evidence: `marathos_julius_laboration/transformations/silver/marathos_silver_obt_2.0.py`)
- Raw supply chain → Legacy cleaner: reads stream (evidence: `marathos_julius_laboration/arcive/marathos_silver_obt.py`)
- Column renaming → Legacy cleaner: renames columns (evidence: `marathos_julius_laboration/arcive/marathos_silver_obt.py`)
- Cleaned results → Athlete and event dimensions: feeds models
- Cleaned results → Results fact: feeds model
- Cleaned results → Distance mart: feeds mart
- Cleaned results → Time-events mart: feeds mart
