Skip to content
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-22366] Basic column lineage handling in consumer #155

Merged
merged 11 commits into from
Feb 19, 2025

Conversation

dolfinus
Copy link
Member

@dolfinus dolfinus commented Feb 4, 2025

Change Summary

Depends on #153.

Implement basic column lineage handler in consumer.

There are 2 DTO classes:

  • ColumnLineageDTO - describes tuple (operation, source_dataset, target_dataset).
  • DatasetColumnRelationDTO - describes source_column -> target_column (optional) relations within ColumnLineageDTO

Extractor builds list of these ColumnLineageDTO for each operation, and then perform bulk insert. Table rows are immutable, using ON CONFLICT DO NOTHING with few additional checks to reduce database IO.

This lacks any tests, these should be added in next commits.

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@dolfinus dolfinus requested a review from TiGrib February 4, 2025 11:41
@TiGrib TiGrib self-assigned this Feb 18, 2025
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 98.14815% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.49%. Comparing base (9dac577) to head (0a6f617).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
data_rentgen/services/uow.py 50.00% 2 Missing ⚠️
...rentgen/db/repositories/dataset_column_relation.py 96.29% 0 Missing and 1 partial ⚠️
data_rentgen/dto/column_lineage.py 96.87% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #155      +/-   ##
===========================================
+ Coverage    93.17%   93.49%   +0.31%     
===========================================
  Files          185      191       +6     
  Lines         4250     4459     +209     
  Branches       281      299      +18     
===========================================
+ Hits          3960     4169     +209     
- Misses         227      229       +2     
+ Partials        63       61       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TiGrib TiGrib requested review from IlyasDevelopment and removed request for TiGrib February 18, 2025 09:31
@TiGrib TiGrib marked this pull request as ready for review February 18, 2025 12:17
@dolfinus
Copy link
Member Author

LGTM. Unfortunately, cannot approve this PR as I'm the author :)

@TiGrib TiGrib merged commit 938a289 into develop Feb 19, 2025
13 checks passed
@TiGrib TiGrib deleted the feature/DOP-22366-base branch February 19, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants