[DOP-22364] Add column lineage tables#153
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #153 +/- ##
===========================================
+ Coverage 92.68% 92.82% +0.14%
===========================================
Files 177 180 +3
Lines 3880 3956 +76
Branches 268 269 +1
===========================================
+ Hits 3596 3672 +76
Misses 222 222
Partials 62 62 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
104c583 to
a43fbf0
Compare
a43fbf0 to
c3f729e
Compare
c3f729e to
581b22a
Compare
581b22a to
0d41435
Compare
7 tasks
TiGrib
reviewed
Feb 5, 2025
Co-authored-by: Kirill Yakimenkov <kayakimenkov@gmail.com>
TiGrib
approved these changes
Feb 5, 2025
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.
Change Summary
Added 2 tables to store column lineage:
dataset_column_relation- tuple of(source_column, target_column, type)with commonfingerprintvalue (hash of specific relation set).column_lineage- tuple of(operation, source_dataset, target_dataset, fingerprint).This combination requires the least amount of space, as relations between columns remain the same between multiple operations/runs/jobs, and sometimes even between datasets.
For example, for 2.6M rows/4.9GB of raw events in Kafka (=1.2M operations/230MB), column lineage requires only:
dataset_column_relation- 14.6k rows, 3.2MBcolumn_lineage- 52.9k rows, 13MBStoring column lineage as flat table
(operation, source_dataset, target_dataset, source_column, target_column, type)requires much more space - 805k rows, 123MB.Note:
target_columnis nullable, but we need unique index over tuple(fingerprint, source_column, target_column), and PG by default considerNULLs as distinct values. This is temporary fixed by usingcoalesce(target_column, ''), but I'm not really sure about that - probably, we should make columnNOT NULLand store empty string here.Related issue number
Checklist
docs/changelog/next_release/<pull request or issue id>.<change type>.rstfile added describing change(see CONTRIBUTING.rst for details.)