# emudamah0906/polaris-claims-lakehouse architecture

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

- Interactive diagram: https://gitdiagram.com/emudamah0906/polaris-claims-lakehouse
- Repository: https://github.com/emudamah0906/polaris-claims-lakehouse

## Overview

Polaris is an in-progress design specification for a P&C claims lakehouse, not a running system. Its principal workflow lands policy and claims data in Bronze, transforms it into Silver, and serves curated Gold marts for BI and the fraud console; a separate FNOL stream produces near-real-time fraud signals. The graph follows README-documented target flows and capabilities. Most implementation directories contain scaffolding only, so edges reflect documented design rather than inspected runtime calls.

Main entry points: [`ingestion/src/polaris_ingest`](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/ingestion/src/polaris_ingest) (Bronze landing), [`orchestration/airflow/dags`](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/orchestration/airflow/dags) (Airflow batch orchestration), [`quality/great_expectations`](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/quality/great_expectations) (Great Expectations), [`databricks/libraries/silver_transforms/src`](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/databricks/libraries/silver_transforms/src) (Spark Silver transforms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Sources and ingestion"]
  node_policy_claim_sources["Policy and claims sources"]
  node_synthetic_data["Synthetic data generator"]
  node_bronze_landing[("Bronze landing")]
  node_fnol_producer["FNOL Kafka producer"]
end

subgraph group_processing["Lakehouse processing"]
  node_adls_bronze[("ADLS Bronze")]
  node_spark_silver["Spark Silver transforms"]
  node_delta_silver[("Delta Silver")]
  node_kafka["Kafka"]
  node_structured_streaming["Structured Streaming"]
  node_fraud_signals[("Fraud signal table")]
end

subgraph group_serving["Serving and consumers"]
  node_snowflake_raw[("Snowflake raw")]
  node_dbt_marts["dbt Gold marts"]
  node_snowflake_gold[("Snowflake Gold")]
  node_fraud_console["Streamlit fraud console"]
end

subgraph group_governance["Orchestration and trust"]
  node_airflow["Airflow batch orchestration"]
  node_great_expectations["Great Expectations"]
  node_data_contracts["Data contracts"]
  node_openlineage["OpenLineage integration"]
  node_marquez["Marquez"]
  node_adf["Optional ADF trigger demo"]
end

subgraph group_platform["Platform and security"]
  node_terraform["Terraform infrastructure"]
  node_key_vault["Azure Key Vault"]
  node_snowflake_rbac["Snowflake RBAC"]
end

node_bi_users(("BI users"))

node_synthetic_data -->|"writes CSVs"| node_policy_claim_sources
node_policy_claim_sources -->|"lands data"| node_bronze_landing
node_bronze_landing -->|"writes Bronze"| node_adls_bronze
node_adls_bronze -->|"conforms data"| node_spark_silver
node_spark_silver -->|"writes Silver"| node_delta_silver
node_fnol_producer -->|"publishes FNOL"| node_kafka
node_kafka -->|"streams events"| node_structured_streaming
node_structured_streaming -->|"writes signals"| node_fraud_signals
node_delta_silver -->|"loads raw"| node_snowflake_raw
node_snowflake_raw -->|"models data"| node_dbt_marts
node_dbt_marts -->|"serves marts"| node_snowflake_gold
node_snowflake_gold -->|"serves analytics"| node_bi_users
node_fraud_signals -->|"feeds console"| node_fraud_console
node_airflow -->|"orchestrates batch"| node_bronze_landing
node_airflow -->|"orchestrates batch"| node_spark_silver
node_airflow -->|"orchestrates batch"| node_dbt_marts
node_great_expectations -->|"validates Bronze"| node_adls_bronze
node_great_expectations -->|"validates Silver"| node_delta_silver
node_data_contracts -->|"defines expectations"| node_great_expectations
node_openlineage -->|"sends lineage"| node_marquez
node_adf -.->|"optionally triggers"| node_bronze_landing
node_terraform -.->|"provisions access"| node_key_vault
node_terraform -->|"manages roles"| node_snowflake_rbac

click node_synthetic_data "https://github.com/emudamah0906/polaris-claims-lakehouse/blob/main/scripts/generate_polaris_data.py"
click node_bronze_landing "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/ingestion/src/polaris_ingest"
click node_fnol_producer "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/streaming/fnol_producer"
click node_spark_silver "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/databricks/libraries/silver_transforms/src"
click node_structured_streaming "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/streaming/spark_streaming/jobs"
click node_dbt_marts "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/dbt/models/marts"
click node_fraud_console "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/consumers/streamlit_fraud_console"
click node_airflow "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/orchestration/airflow/dags"
click node_great_expectations "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/quality/great_expectations"
click node_data_contracts "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/quality/data_contracts"
click node_openlineage "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/orchestration/airflow/plugins/openlineage"
click node_marquez "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/lineage/marquez"
click node_adf "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/adf/pipelines"
click node_terraform "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/infra/terraform"
click node_snowflake_rbac "https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/infra/terraform/snowflake"

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_policy_claim_sources,node_synthetic_data,node_bronze_landing,node_fnol_producer,node_bi_users toneBlue
class node_adls_bronze,node_spark_silver,node_delta_silver,node_kafka,node_structured_streaming,node_fraud_signals toneAmber
class node_snowflake_raw,node_dbt_marts,node_snowflake_gold,node_fraud_console toneMint
class node_airflow,node_great_expectations,node_data_contracts,node_openlineage,node_marquez,node_adf toneRose
class node_terraform,node_key_vault,node_snowflake_rbac toneIndigo
```

## Components

### Sources and ingestion

- **Policy and claims sources**
- [Synthetic data generator](https://github.com/emudamah0906/polaris-claims-lakehouse/blob/main/scripts/generate_polaris_data.py): `scripts/generate_polaris_data.py`
- [Bronze landing](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/ingestion/src/polaris_ingest): `ingestion/src/polaris_ingest`
- [FNOL Kafka producer](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/streaming/fnol_producer): `streaming/fnol_producer`

### Lakehouse processing

- **ADLS Bronze**
- [Spark Silver transforms](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/databricks/libraries/silver_transforms/src): `databricks/libraries/silver_transforms/src`
- **Delta Silver**
- **Kafka**
- [Structured Streaming](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/streaming/spark_streaming/jobs): `streaming/spark_streaming/jobs`
- **Fraud signal table**

### Serving and consumers

- **Snowflake raw**
- [dbt Gold marts](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/dbt/models/marts): `dbt/models/marts`
- **Snowflake Gold**
- [Streamlit fraud console](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/consumers/streamlit_fraud_console): `consumers/streamlit_fraud_console`

### Orchestration and trust

- [Airflow batch orchestration](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/orchestration/airflow/dags): `orchestration/airflow/dags`
- [Great Expectations](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/quality/great_expectations): `quality/great_expectations`
- [Data contracts](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/quality/data_contracts): `quality/data_contracts`
- [OpenLineage integration](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/orchestration/airflow/plugins/openlineage): `orchestration/airflow/plugins/openlineage`
- [Marquez](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/lineage/marquez): `lineage/marquez`
- [Optional ADF trigger demo](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/adf/pipelines): `adf/pipelines`

### Platform and security

- [Terraform infrastructure](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/infra/terraform): `infra/terraform`
- **Azure Key Vault**
- [Snowflake RBAC](https://github.com/emudamah0906/polaris-claims-lakehouse/tree/main/infra/terraform/snowflake): `infra/terraform/snowflake`

### Other components

- **BI users**

## Connections

- Synthetic data generator → Policy and claims sources: writes CSVs (evidence: `scripts/generate_polaris_data.py`)
- Policy and claims sources → Bronze landing: lands data (evidence: `README.md`)
- Bronze landing → ADLS Bronze: writes Bronze (evidence: `README.md`)
- ADLS Bronze → Spark Silver transforms: conforms data (evidence: `README.md`)
- Spark Silver transforms → Delta Silver: writes Silver (evidence: `README.md`)
- FNOL Kafka producer → Kafka: publishes FNOL (evidence: `README.md`)
- Kafka → Structured Streaming: streams events (evidence: `README.md`)
- Structured Streaming → Fraud signal table: writes signals (evidence: `README.md`)
- Delta Silver → Snowflake raw: loads raw (evidence: `README.md`)
- Snowflake raw → dbt Gold marts: models data (evidence: `README.md`)
- dbt Gold marts → Snowflake Gold: serves marts (evidence: `README.md`)
- Snowflake Gold → BI users: serves analytics (evidence: `README.md`)
- Fraud signal table → Streamlit fraud console: feeds console (evidence: `README.md`)
- Airflow batch orchestration → Bronze landing: orchestrates batch (evidence: `README.md`)
- Airflow batch orchestration → Spark Silver transforms: orchestrates batch (evidence: `README.md`)
- Airflow batch orchestration → dbt Gold marts: orchestrates batch (evidence: `README.md`)
- Great Expectations → ADLS Bronze: validates Bronze (evidence: `README.md`)
- Great Expectations → Delta Silver: validates Silver (evidence: `README.md`)
- Data contracts → Great Expectations: defines expectations (evidence: `README.md`)
- OpenLineage integration → Marquez: sends lineage (evidence: `README.md`)
- Optional ADF trigger demo → Bronze landing: optionally triggers (evidence: `README.md`)
- Terraform infrastructure → Azure Key Vault: provisions access (evidence: `README.md`)
- Terraform infrastructure → Snowflake RBAC: manages roles (evidence: `README.md`)
