dbt Analytics Engineering (50 Qs)•Part 3: Enterprise Scale, Performance & CI/CD Pipelines (Senior / Staff)
Model Versions (`latest_version` / `v1`, `v2`): Managing deprecation cycles and non-breaking migrations.
senior LevelMost AskedCode ExampleFormsPerformancePipes
In Simple Words: When making breaking changes to a core public dimension table used by 50 downstream dashboards:
yaml
models:
- name: dim_users
latest_version: 2
versions:
- v: 1
- v: 2
config:
contract: { enforced: true }
- Creates physical tables
dim_users_v1anddim_users_v2. {{ ref('dim_users') }}defaults tolatest_version(v2), but legacy dashboards can continue referencing{{ ref('dim_users', v=1) }}.- Allows graceful multi-month migration windows before deprecating v1.