Compare column-level lineage between two versions of a SQL query to show added, removed, and changed data flow edges.
Agent: any (read-only analysis) Tools used: lineage_check, read, bash (for git operations), glob
Compare column-level lineage between two versions of a SQL model to identify changes in data flow.
Get the original SQL — Either:
git show HEAD:path/to/file.sql via bash to get the last committed versionGet the modified SQL — Either:
Run lineage on both versions:
lineage_check with the original SQLlineage_check with the modified SQL:
Report the diff in a clear format:
Lineage Diff: model_name
═══════════════════════════
+ ADDED (new data flow):
+ source_table.new_column → target_table.output_column
- REMOVED (broken data flow):
- source_table.old_column → target_table.output_column
UNCHANGED: 5 edges
Impact: 1 new edge, 1 removed edge
The user invokes this skill with a file path:
/lineage-diff models/marts/dim_customers.sql — Compare current file against last git commit/lineage-diff — Compare staged changes in the current fileTwo edges are considered the same if all four fields match:
source_table + source_column + target_table + target_columnThe transform field is informational and not used for matching.
Use the tools: lineage_check, read, bash (for git operations), glob.