Create staging dbt models for Toronto neighbourhood tables #60

Closed
opened 2026-01-16 16:20:21 +00:00 by lmiranda · 1 comment
Owner

Summary

Create dbt staging models for the new Toronto neighbourhood-related database tables.

Models to Create

Model Source Table
stg_toronto__neighbourhoods dim_neighbourhood
stg_toronto__census fact_census
stg_toronto__crime fact_crime
stg_toronto__amenities fact_amenities
stg_cmhc__zone_crosswalk bridge_cmhc_neighbourhood

Acceptance Criteria

  • All 5 staging models created in dbt/models/staging/
  • Models follow naming convention stg_{source}__{entity}
  • Basic cleaning and type casting applied
  • Models documented in _staging.yml
  • Source definitions added to _sources.yml
  • dbt run --select staging passes

Technical Notes

  • Staging models should be 1:1 with source tables
  • Apply consistent column naming (snake_case)
  • Cast geometry columns appropriately for downstream use

Labels: type:feature, component:database, priority:high, tech:dbt

## Summary Create dbt staging models for the new Toronto neighbourhood-related database tables. ## Models to Create | Model | Source Table | |-------|--------------| | `stg_toronto__neighbourhoods` | dim_neighbourhood | | `stg_toronto__census` | fact_census | | `stg_toronto__crime` | fact_crime | | `stg_toronto__amenities` | fact_amenities | | `stg_cmhc__zone_crosswalk` | bridge_cmhc_neighbourhood | ## Acceptance Criteria - [ ] All 5 staging models created in `dbt/models/staging/` - [ ] Models follow naming convention `stg_{source}__{entity}` - [ ] Basic cleaning and type casting applied - [ ] Models documented in `_staging.yml` - [ ] Source definitions added to `_sources.yml` - [ ] `dbt run --select staging` passes ## Technical Notes - Staging models should be 1:1 with source tables - Apply consistent column naming (snake_case) - Cast geometry columns appropriately for downstream use **Labels:** type:feature, component:database, priority:high, tech:dbt
lmiranda added this to the Launch: Host, Bio and Toronto House Market Analysis project 2026-01-16 16:36:47 +00:00
lmiranda self-assigned this 2026-01-16 16:36:50 +00:00
lmiranda moved this to Done in Launch: Host, Bio and Toronto House Market Analysis on 2026-01-16 16:37:46 +00:00
Author
Owner

Completed

All 5 staging models created:

  • stg_toronto__neighbourhoods.sql - Neighbourhood dimension
  • stg_toronto__census.sql - Census demographics
  • stg_toronto__crime.sql - Crime statistics
  • stg_toronto__amenities.sql - Amenity counts
  • stg_cmhc__zone_crosswalk.sql - Zone-to-neighbourhood weights

Acceptance Criteria Met:

  • All 5 staging models created in dbt/models/staging/
  • Models follow naming convention stg_{source}__{entity}
  • Basic cleaning and type casting applied
  • Models documented in _staging.yml
  • Source definitions added to _sources.yml
  • dbt parse passes without errors
## Completed ✅ All 5 staging models created: - `stg_toronto__neighbourhoods.sql` - Neighbourhood dimension - `stg_toronto__census.sql` - Census demographics - `stg_toronto__crime.sql` - Crime statistics - `stg_toronto__amenities.sql` - Amenity counts - `stg_cmhc__zone_crosswalk.sql` - Zone-to-neighbourhood weights **Acceptance Criteria Met:** - [x] All 5 staging models created in `dbt/models/staging/` - [x] Models follow naming convention `stg_{source}__{entity}` - [x] Basic cleaning and type casting applied - [x] Models documented in `_staging.yml` - [x] Source definitions added to `_sources.yml` - [x] `dbt parse` passes without errors
Sign in to join this conversation.