Change Classification
Change Classification examines each modified model and categorizes the change into one of three types:
- Additive changes
- Column changes
- Model-wide changes
Without classification, you have to assume that any change to a model's SQL affects every downstream model. In practice, changes differ in impact: a formatting adjustment or a new column shouldn't disrupt downstream dependencies, while a new filter condition can change every downstream result. Change Classification tells you whether a change affects downstream models and, if so, to what extent.
Usage
Use the Impact Radius view to analyze changed models and see their impacted downstream models.
Categories of change
Additive change
No downstream models are affected. Common cases include adding a new column, adding comments, or reformatting SQL without altering logic.
Example: Adding a new column
Adding a new column such as status doesn't affect downstream models that don't reference it.
Column change
Only downstream models that reference the changed columns are affected. Common cases include removing, renaming, or redefining a column.
Example: Removing a column
Example: Renaming a column
Example: Redefining a column
Model-wide change
All downstream models are affected. Common cases include adding a filter condition or adding a GROUP BY column.
Example: Adding a filter condition
This may reduce the number of rows, affecting all downstream logic that depends on the original row set.
Example: Adding a GROUP BY column
This changes the granularity of the result set, which affects every dependent model.
select
user_id,
++ order_date,
count(*) as total_orders
from
{{ ref("orders") }}
-- group by user_id
++ group by user_id, order_date
Limitations
Change Classification is intentionally conservative to prioritize safety. As a result, a modified model may be classified as a model-wide change when it is actually an additive or column change. Common cases include:
- Logically equivalent rewrites, such as changing
a + btob + a. - Adding a
LEFT JOINand selecting columns from the joined table. This pattern is often used to enrich a model with dimension data without affecting existing downstream models. - Modified Python models and seeds, which are always treated as model-wide changes.
When to Use
- Determine which downstream models need validation after a change
- Prioritize review effort based on impact severity
- Understand whether a refactor affects dependent models
- Assess risk before merging model changes
Technology
Change Classification uses the SQL parsing and AST diff capabilities of SQLGlot to compare the semantic trees of the base and current SQL.
Related
- Impact Radius - Visualize affected downstream models
- Column-Level Lineage - Trace column dependencies
- Code Change - Review the actual SQL modifications