refactor(dbt): migrate to domain-scoped schema names
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
- Create generate_schema_name macro to use custom schema names directly - Update dbt_project.yml schemas: staging→stg_toronto, intermediate→int_toronto, marts→mart_toronto - Add dbt/macros/toronto/ directory for future domain-specific macros - Fix documentation drift in PROJECT_REFERENCE.md (load-data-only→load-toronto-only) - Update DATABASE_SCHEMA.md with new schema names - Update CLAUDE.md database schemas table - Update adding-dashboard.md runbook with domain-scoped pattern Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -122,9 +122,9 @@ erDiagram
|
||||
|--------|---------|------------|
|
||||
| `public` | Shared dimensions (dim_time) | SQLAlchemy |
|
||||
| `raw_toronto` | Toronto dimension and fact tables | SQLAlchemy |
|
||||
| `staging` | Staging models | dbt |
|
||||
| `intermediate` | Intermediate models | dbt |
|
||||
| `marts` | Analytical tables | dbt |
|
||||
| `stg_toronto` | Toronto staging models | dbt |
|
||||
| `int_toronto` | Toronto intermediate models | dbt |
|
||||
| `mart_toronto` | Toronto analytical tables | dbt |
|
||||
|
||||
### Raw Toronto Schema (raw_toronto)
|
||||
|
||||
@@ -149,7 +149,7 @@ Shared dimensions used across all projects:
|
||||
|-------|-------------|
|
||||
| `dim_time` | Time dimension (monthly grain) |
|
||||
|
||||
### Staging Schema (dbt)
|
||||
### Staging Schema - stg_toronto (dbt)
|
||||
|
||||
Staging models provide 1:1 cleaned representations of source data:
|
||||
|
||||
@@ -164,7 +164,7 @@ Staging models provide 1:1 cleaned representations of source data:
|
||||
| `stg_dimensions__cmhc_zones` | raw.cmhc_zones | CMHC zone boundaries |
|
||||
| `stg_cmhc__zone_crosswalk` | raw.crosswalk | Zone-neighbourhood mapping |
|
||||
|
||||
### Marts Schema (dbt)
|
||||
### Marts Schema - mart_toronto (dbt)
|
||||
|
||||
Analytical tables ready for dashboard consumption:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user