-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOP-22364] Add column lineage tables #153
Merged
Merged
Conversation
This file contains 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
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. |
dolfinus
force-pushed
the
feature/DOP-22364
branch
from
February 4, 2025 09:05
104c583
to
a43fbf0
Compare
dolfinus
force-pushed
the
feature/DOP-22364
branch
from
February 4, 2025 09:09
a43fbf0
to
c3f729e
Compare
dolfinus
force-pushed
the
feature/DOP-22364
branch
from
February 4, 2025 09:10
c3f729e
to
581b22a
Compare
dolfinus
force-pushed
the
feature/DOP-22364
branch
from
February 4, 2025 09:12
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
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 commonfingerprint
value (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_column
is nullable, but we need unique index over tuple(fingerprint, source_column, target_column)
, and PG by default considerNULL
s as distinct values. This is temporary fixed by usingcoalesce(target_column, '')
, but I'm not really sure about that - probably, we should make columnNOT NULL
and store empty string here.Related issue number
Checklist
docs/changelog/next_release/<pull request or issue id>.<change type>.rst
file added describing change(see CONTRIBUTING.rst for details.)