Skip to content

Commit a8b1e95

Browse files
authored
Merge pull request #17 from DataRecce/feature/drc-1302-model-to-column-document-update
CLL: Add impact radius of a column
2 parents 24529df + 32b7898 commit a8b1e95

File tree

5 files changed

+70
-3
lines changed

5 files changed

+70
-3
lines changed
2.59 KB
Loading
-14.6 KB
Loading
140 KB
Loading
171 KB
Loading

docs/features/column-level-lineage.md

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ Common use-cases for column-level lineage are
1313

1414
## Usage
1515

16-
1. Select a node in the lineage DAG, then click the **eye** icon next to the column you want to view.
16+
1. Select a node in the lineage DAG, then click the the column you want to view.
1717

1818
![alt text](../assets/images/features/cll-1.png){: .shadow}
1919

2020
1. The column-level lineage for the selected column will be displayed.
2121

2222
![alt text](../assets/images/features/cll-2.png){: .shadow}
2323

24+
1. To exit column-level lineage view, click the close button in the upper-left corner.
25+
26+
![alt text](../assets/images/features/cll-3.png){: .shadow}
27+
2428
## Transformation Types
2529

2630
The transformation type is also displayed for each column, which will help you understand how the column was generated or modified.
@@ -34,6 +38,69 @@ The transformation type is also displayed for each column, which will help you u
3438
| Unknown | We have no information about the transformation type. This could be due to a parse error, or other unknown reason. |
3539

3640

37-
## Limitation
41+
## Impact Radius of a Column
42+
43+
The **right side of the Column-Level Lineage (CLL)** graph represents the **impact radius** of a selected column.
44+
This view helps you quickly understand what will be affected if that column changes.
45+
46+
### What does the impact radius include?
47+
48+
- **Downstream columns** that directly reference the selected column
49+
- **Downstream models** that directly depend on the selected column
50+
- **All indirect downstream columns and models** that transitively depend on it
51+
52+
This helps you evaluate both the direct and downstream effects of a column change, making it easier to understand its overall impact.
53+
54+
55+
### Example: Simplified Model Chain
56+
57+
Given the following models, here's how changes to `stg_orders.status` would impact downstream models:
58+
59+
```sql
60+
-- stg_orders.sql
61+
select
62+
order_id,
63+
customer_id,
64+
status,
65+
...
66+
from {{ ref("raw_orders") }}
67+
68+
69+
-- orders.sql
70+
select
71+
order_id,
72+
customer_id,
73+
status,
74+
...
75+
from {{ ref("stg_orders") }}
76+
77+
78+
-- customers.sql
79+
select
80+
c.customer_id,
81+
...
82+
from {{ ref("stg_customers") }} as c
83+
join {{ ref("stg_orders") }} as o
84+
on c.customer_id = o.customer_id
85+
where o.status = 'completed'
86+
group by c.customer_id
87+
88+
89+
-- customer_segments.sql
90+
select
91+
customer_id,
92+
...
93+
from {{ ref("customers") }}
94+
```
95+
96+
![alt text](../assets/images/features/cll-example.png){: .shadow}
97+
98+
The following impact is detected:
99+
100+
- **orders**: This model is partially impacted, as it selects the `status` column directly from `stg_orders` but does not apply any transformation or filtering logic. The change is limited to the `status` column only.
101+
102+
- **customers**: This model is fully impacted, because it uses `status` in a WHERE clause (`where o.status = 'completed'`). Any change to the logic in `stg_orders.status` can affect the entire output of the model.
103+
104+
- **customer_segments**: This model is indirectly impacted, as it depends on the `customers` model, which itself is fully impacted. Even though `customer_segments` does not directly reference `status`, changes can still propagate downstream via its upstream dependency.
105+
38106

39-
Column-level lineage only displays column selection operations. It does not indicate if a column has been used in filters (WHERE clauses), with grouping (GROUP BY), joins, or other transformations.

0 commit comments

Comments
 (0)