# tanujvr/telemetry-sdp architecture

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

- Interactive diagram: https://gitdiagram.com/tanujvr/telemetry-sdp
- Repository: https://github.com/tanujvr/telemetry-sdp

## Overview

This repository is a Databricks telemetry lakehouse with a simulator that writes telemetry and device-registry JSON into a landing zone, followed by bronze ingestion, silver validation/enrichment, and gold analytics. The graph preserves the distinct telemetry and registry paths, including quarantine and SCD2 device history, plus the documented gold outputs and dashboard-query file. The SQL contents and deployment wiring were not sampled, and the README is empty, so no dashboard-consumption or deployment relationships are asserted.

Main entry points: [`telemetry-lakehouse/src/pipeline/transformations/02_silver.py`](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py) (Validated telemetry), [`telemetry-lakehouse/src/pipeline/transformations/01_bronze.py`](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/01_bronze.py) (Bronze telemetry), [`telemetry-lakehouse/src/ingestion/generate_telemetry.py`](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/ingestion/generate_telemetry.py) (Telemetry simulator), [`telemetry-lakehouse/src/pipeline/transformations/03_gold.py`](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py) (Daily fleet KPIs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Ingestion"]
  node_simulator["Telemetry simulator"]
  node_landing[("JSON landing zone")]
  node_bronze_telemetry[("Bronze telemetry<br/>[01_bronze.py]")]
  node_bronze_registry[("Bronze registry<br/>[01_bronze.py]")]
end

subgraph group_refine["Silver refinement"]
  node_parsed["Parsed telemetry<br/>[02_silver.py]"]
  node_silver[("Validated telemetry<br/>[02_silver.py]")]
  node_quarantine[("Rejected telemetry<br/>[02_silver.py]")]
  node_registry_clean["Clean registry events<br/>[02_silver.py]"]
  node_device_dim[("SCD2 device dimension<br/>[02_silver.py]")]
end

subgraph group_analytics["Gold analytics"]
  node_device_health[("Hourly device health<br/>[03_gold.py]")]
  node_fleet_kpis[("Daily fleet KPIs<br/>[03_gold.py]")]
  node_latest_status[("Latest device status<br/>[03_gold.py]")]
  node_alerts[("Anomaly alerts<br/>[03_gold.py]")]
  node_quality[("Daily quality scorecard<br/>[03_gold.py]")]
end

subgraph group_consumption["Analytics access"]
  node_dashboard_queries["Dashboard queries"]
end

node_operator(("Pipeline operator"))

node_operator -->|"runs"| node_simulator
node_simulator -->|"writes JSON"| node_landing
node_landing -->|"loads telemetry"| node_bronze_telemetry
node_landing -->|"loads registry"| node_bronze_registry
node_bronze_telemetry -->|"parses stream"| node_parsed
node_parsed -->|"validates and deduplicates"| node_silver
node_parsed -->|"routes invalid rows"| node_quarantine
node_bronze_registry -->|"cleans stream"| node_registry_clean
node_registry_clean -->|"applies CDC"| node_device_dim
node_silver -->|"aggregates"| node_device_health
node_silver -->|"aggregates"| node_fleet_kpis
node_device_dim -->|"point-in-time joins"| node_fleet_kpis
node_silver -->|"selects latest readings"| node_latest_status
node_device_dim -->|"joins current devices"| node_latest_status
node_silver -->|"filters anomalies"| node_alerts
node_bronze_telemetry -->|"counts ingested records"| node_quality
node_quarantine -->|"counts rule violations"| node_quality

click node_simulator "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/ingestion/generate_telemetry.py"
click node_bronze_telemetry "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/01_bronze.py"
click node_bronze_registry "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/01_bronze.py"
click node_parsed "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py"
click node_silver "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py"
click node_quarantine "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py"
click node_registry_clean "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py"
click node_device_dim "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py"
click node_device_health "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py"
click node_fleet_kpis "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py"
click node_latest_status "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py"
click node_alerts "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py"
click node_quality "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py"
click node_dashboard_queries "https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/sql/dashboard_queries.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_simulator,node_landing,node_bronze_telemetry,node_bronze_registry toneBlue
class node_parsed,node_silver,node_quarantine,node_registry_clean,node_device_dim toneAmber
class node_device_health,node_fleet_kpis,node_latest_status,node_alerts,node_quality toneMint
class node_dashboard_queries toneRose
class node_operator toneIndigo
```

## Components

### Ingestion

- [Telemetry simulator](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/ingestion/generate_telemetry.py): `telemetry-lakehouse/src/ingestion/generate_telemetry.py`
- **JSON landing zone**
- [Bronze telemetry](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/01_bronze.py): `telemetry-lakehouse/src/pipeline/transformations/01_bronze.py`
- [Bronze registry](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/01_bronze.py): `telemetry-lakehouse/src/pipeline/transformations/01_bronze.py`

### Silver refinement

- [Parsed telemetry](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py): `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`
- [Validated telemetry](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py): `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`
- [Rejected telemetry](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py): `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`
- [Clean registry events](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py): `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`
- [SCD2 device dimension](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/02_silver.py): `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`

### Gold analytics

- [Hourly device health](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py): `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`
- [Daily fleet KPIs](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py): `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`
- [Latest device status](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py): `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`
- [Anomaly alerts](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py): `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`
- [Daily quality scorecard](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/src/pipeline/transformations/03_gold.py): `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`

### Analytics access

- [Dashboard queries](https://github.com/tanujvr/telemetry-sdp/blob/main/telemetry-lakehouse/sql/dashboard_queries.sql): `telemetry-lakehouse/sql/dashboard_queries.sql`

### Other components

- **Pipeline operator**

## Connections

- Pipeline operator → Telemetry simulator: runs (evidence: `telemetry-lakehouse/src/ingestion/generate_telemetry.py`)
- Telemetry simulator → JSON landing zone: writes JSON (evidence: `telemetry-lakehouse/src/ingestion/generate_telemetry.py`)
- JSON landing zone → Bronze telemetry: loads telemetry (evidence: `telemetry-lakehouse/src/pipeline/transformations/01_bronze.py`)
- JSON landing zone → Bronze registry: loads registry (evidence: `telemetry-lakehouse/src/pipeline/transformations/01_bronze.py`)
- Bronze telemetry → Parsed telemetry: parses stream (evidence: `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`)
- Parsed telemetry → Validated telemetry: validates and deduplicates (evidence: `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`)
- Parsed telemetry → Rejected telemetry: routes invalid rows (evidence: `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`)
- Bronze registry → Clean registry events: cleans stream (evidence: `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`)
- Clean registry events → SCD2 device dimension: applies CDC (evidence: `telemetry-lakehouse/src/pipeline/transformations/02_silver.py`)
- Validated telemetry → Hourly device health: aggregates (evidence: `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`)
- Validated telemetry → Daily fleet KPIs: aggregates (evidence: `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`)
- SCD2 device dimension → Daily fleet KPIs: point-in-time joins (evidence: `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`)
- Validated telemetry → Latest device status: selects latest readings (evidence: `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`)
- SCD2 device dimension → Latest device status: joins current devices (evidence: `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`)
- Validated telemetry → Anomaly alerts: filters anomalies (evidence: `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`)
- Bronze telemetry → Daily quality scorecard: counts ingested records (evidence: `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`)
- Rejected telemetry → Daily quality scorecard: counts rule violations (evidence: `telemetry-lakehouse/src/pipeline/transformations/03_gold.py`)
