# rajib-k-das/gtm-revenue-operations-mart architecture

> Architecture diagram of the GitHub repository rajib-k-das/gtm-revenue-operations-mart, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rajib-k-das/gtm-revenue-operations-mart
- Repository: https://github.com/rajib-k-das/gtm-revenue-operations-mart

## Overview

This repository builds a dbt + DuckDB revenue-operations warehouse from a synthetic Salesforce-style CRM extract. The main workflow generates CSVs, loads raw tables, transforms CRM objects into typed staging and historical opportunity versions, then produces pipeline snapshot and waterfall marts. The README also describes account and rep dimensions and a findings summary. SQL model dependencies and the internals of unsampled models are not shown, so transformation links follow the documented architecture rather than asserting unverified calls.

Main entry points: [`models/intermediate/int_opportunity_versions.sql`](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/intermediate/int_opportunity_versions.sql) (Opportunity versions), [`scripts/summarize_findings.py`](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/scripts/summarize_findings.py) (Findings summary), [`ingest/load_crm.py`](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/ingest/load_crm.py) (CRM loader), [`models/staging`](https://github.com/rajib-k-das/gtm-revenue-operations-mart/tree/main/models/staging) (Typed CRM staging)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["CRM inputs"]
  node_generator["CRM generator<br/>[generate_crm.py]"]
  node_csv["CRM CSV extract"]
  node_loader["CRM loader<br/>[load_crm.py]"]
end

subgraph group_warehouse["Warehouse transformations"]
  node_raw[("Raw CRM tables<br/>[load_crm.py]")]
  node_staging["Typed CRM staging"]
  node_versions["Opportunity versions"]
  node_snapshot_dates["Snapshot dates"]
end

subgraph group_marts["Analytics marts"]
  node_snapshots["Pipeline snapshots"]
  node_waterfall["Pipeline waterfall"]
  node_account_dim["Account dimension<br/>[dim_account.sql]"]
  node_rep_dim["Rep dimension<br/>[dim_rep.sql]"]
end

subgraph group_analysis["Findings"]
  node_summarizer["Findings summary"]
end

node_analyst(("Revenue operations team"))

node_generator -->|"writes CSVs"| node_csv
node_csv -->|"loads extract"| node_loader
node_loader -->|"writes tables"| node_raw
node_raw -->|"types CRM data"| node_staging
node_staging -->|"builds history"| node_versions
node_versions -->|"builds snapshots"| node_snapshots
node_versions -->|"builds waterfall"| node_waterfall
node_snapshot_dates -.->|"sets dates"| node_snapshots
node_versions -.->|"supplies entities"| node_account_dim
node_versions -.->|"supplies entities"| node_rep_dim
node_waterfall -->|"queries results"| node_summarizer
node_versions -->|"queries history"| node_summarizer
node_rep_dim -->|"joins rep data"| node_summarizer
node_summarizer -->|"prints findings"| node_analyst

click node_generator "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/generate/generate_crm.py"
click node_loader "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/ingest/load_crm.py"
click node_raw "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/ingest/load_crm.py"
click node_staging "https://github.com/rajib-k-das/gtm-revenue-operations-mart/tree/main/models/staging"
click node_versions "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/intermediate/int_opportunity_versions.sql"
click node_snapshot_dates "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/intermediate/int_snapshot_dates.sql"
click node_snapshots "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/marts/fct_pipeline_snapshots.sql"
click node_waterfall "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/marts/fct_pipeline_waterfall.sql"
click node_account_dim "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/marts/dim_account.sql"
click node_rep_dim "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/marts/dim_rep.sql"
click node_summarizer "https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/scripts/summarize_findings.py"

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_generator,node_csv,node_loader toneBlue
class node_raw,node_staging,node_versions,node_snapshot_dates toneAmber
class node_snapshots,node_waterfall,node_account_dim,node_rep_dim toneMint
class node_summarizer toneRose
class node_analyst toneIndigo
```

## Components

### CRM inputs

- [CRM generator](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/generate/generate_crm.py): `generate/generate_crm.py`
- **CRM CSV extract**
- [CRM loader](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/ingest/load_crm.py): `ingest/load_crm.py`

### Warehouse transformations

- [Raw CRM tables](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/ingest/load_crm.py): `ingest/load_crm.py`
- [Typed CRM staging](https://github.com/rajib-k-das/gtm-revenue-operations-mart/tree/main/models/staging): `models/staging`
- [Opportunity versions](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/intermediate/int_opportunity_versions.sql): `models/intermediate/int_opportunity_versions.sql`
- [Snapshot dates](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/intermediate/int_snapshot_dates.sql): `models/intermediate/int_snapshot_dates.sql`

### Analytics marts

- [Pipeline snapshots](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/marts/fct_pipeline_snapshots.sql): `models/marts/fct_pipeline_snapshots.sql`
- [Pipeline waterfall](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/marts/fct_pipeline_waterfall.sql): `models/marts/fct_pipeline_waterfall.sql`
- [Account dimension](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/marts/dim_account.sql): `models/marts/dim_account.sql`
- [Rep dimension](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/models/marts/dim_rep.sql): `models/marts/dim_rep.sql`

### Findings

- [Findings summary](https://github.com/rajib-k-das/gtm-revenue-operations-mart/blob/main/scripts/summarize_findings.py): `scripts/summarize_findings.py`

### Other components

- **Revenue operations team**

## Connections

- CRM generator → CRM CSV extract: writes CSVs (evidence: `README.md`)
- CRM CSV extract → CRM loader: loads extract (evidence: `ingest/load_crm.py`)
- CRM loader → Raw CRM tables: writes tables (evidence: `ingest/load_crm.py`)
- Raw CRM tables → Typed CRM staging: types CRM data (evidence: `README.md`)
- Typed CRM staging → Opportunity versions: builds history (evidence: `README.md`)
- Opportunity versions → Pipeline snapshots: builds snapshots (evidence: `README.md`)
- Opportunity versions → Pipeline waterfall: builds waterfall (evidence: `README.md`)
- Snapshot dates → Pipeline snapshots: sets dates
- Opportunity versions → Account dimension: supplies entities
- Opportunity versions → Rep dimension: supplies entities
- Pipeline waterfall → Findings summary: queries results (evidence: `scripts/summarize_findings.py`)
- Opportunity versions → Findings summary: queries history (evidence: `scripts/summarize_findings.py`)
- Rep dimension → Findings summary: joins rep data (evidence: `scripts/summarize_findings.py`)
- Findings summary → Revenue operations team: prints findings (evidence: `scripts/summarize_findings.py`)
