Skip to content

Commit addc752

Browse files
refactor: centralize dbt materializations in dbt_project.yml
- Move materialization configs from individual model files to dbt_project.yml - Switch staging models to view materialization (base models now incremental) - Add explicit intermediate folder configuration - Remove redundant inline config blocks from 8 model files Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 4b42328 commit addc752

File tree

9 files changed

+6
-50
lines changed

9 files changed

+6
-50
lines changed

dbt_project.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ vars:
3030
models:
3131
gtfsrt_sandbox:
3232
staging:
33-
+materialized: table # Cache locally to avoid re-downloading
33+
+materialized: view
34+
base:
35+
+materialized: incremental
36+
intermediate:
37+
+materialized: view
3438
marts:
35-
+materialized: view # Views on top of cached staging tables
39+
+materialized: view

models/marts/feed_summary.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{
2-
config(
3-
materialized='view'
4-
)
5-
}}
6-
71
/*
82
Daily summary statistics for vehicle position data.
93
Shows feed activity and coverage per day.

models/marts/vehicle_activity.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{
2-
config(
3-
materialized='view'
4-
)
5-
}}
6-
71
/*
82
Hourly vehicle activity analysis.
93
Shows vehicle movement patterns and coverage over time.

models/staging/base/base_service_alerts.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{
2-
config(
3-
materialized='incremental'
4-
)
5-
}}
6-
71
SELECT
82
*,
93
uuid() as _uuid

models/staging/base/base_trip_updates.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{
2-
config(
3-
materialized='incremental'
4-
)
5-
}}
6-
71
SELECT
82
*,
93
uuid() as _uuid

models/staging/base/base_vehicle_positions.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{
2-
config(
3-
materialized='incremental'
4-
)
5-
}}
6-
71
SELECT
82
*,
93
uuid() as _uuid

models/staging/stg_service_alerts.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{
2-
config(
3-
materialized='table'
4-
)
5-
}}
6-
71
/*
82
Staging model for GTFS-RT service alerts.
93
Downloads data from GCS on first run and caches locally.

models/staging/stg_trip_updates.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{
2-
config(
3-
materialized='table'
4-
)
5-
}}
6-
71
/*
82
Staging model for GTFS-RT trip updates.
93
Downloads data from GCS on first run and caches locally.

models/staging/stg_vehicle_positions.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{
2-
config(
3-
materialized='table'
4-
)
5-
}}
6-
71
/*
82
Staging model for GTFS-RT vehicle positions.
93
Downloads data from GCS on first run and caches locally.

0 commit comments

Comments
 (0)