feat: focused profiling — only profile changed columns#1
Open
feat: focused profiling — only profile changed columns#1
Conversation
For wide models (100+ columns), data-diff now profiles only the columns that actually changed, using sqlglot AST analysis. This reduces BQ compute by ~90% for typical changes to wide models. How it works: - parse_columns.py identifies added_columns + expression_changes - is_cte_change_additive() classifies CTE modifications: - Additive (new LEFT JOINs, new columns) → safe for focused profiling - Structural (WHERE/filter/JOIN changes) → falls back to full profiling - EXCEPT DISTINCT row comparison always covers ALL columns as safety net - --full flag to override and profile everything Also syncs upstream improvements: - data-diff.sh: get_affected_columns() helper, column filter in build_profile_query(), profiling mode tracking per model - template.html: focused profiling banner, skip-row styling for non-profiled columns (shown as — instead of misleading zeros) - SKILL.md: document --full flag and focused profiling behavior
e434d44 to
ad34060
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs focused profiling from the internal dbt repo. For wide models (100+ columns), profiles only columns that actually changed — ~90% reduction in BQ compute.
See finn-auto/dbt#7445 for the full context and test results.