[DOP-36098] Create LineageBuilder class for fixtures#435
Open
[DOP-36098] Create LineageBuilder class for fixtures#435
Conversation
dolfinus
reviewed
Apr 9, 2026
| builder = LineageBuilder(async_session) | ||
| job_location = await builder.create_location(key="simple_lineage_job_location") | ||
| job_type = await builder.create_job_type(key="simple_lineage_job_type") | ||
| job = await builder.create_job( |
Member
There was a problem hiding this comment.
Lineage tests are not using location at all, so it can be generated for each job, and nothing should happen. Just an idea
dolfinus
reviewed
Apr 9, 2026
| self.column_relations: dict[str, DatasetColumnRelation] = {} | ||
|
|
||
| # Optional reverse index useful for debugging and ad-hoc assertions. | ||
| self.by_id: dict[str, object] = {} |
Member
There was a problem hiding this comment.
Key should include object type. Without this information it is impossible to tell apart job.id = 1; by_id[job.id] from dataset.id = 1; by_id[dataset.id]
Contributor
Author
There was a problem hiding this comment.
Yeah. Right now I'm think that it's not best realization and maybe it's better to rewright all test fixtures using by_key implementation
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
Add low level class LineageBuilder. It's responsibility to create base entities.
My proposal for next step is add higher level helper-functions like:
and others ...
Related issue number
[DOP-36098]
Checklist
docs/changelog/next_release/<pull request or issue id>.<change type>.rstfile added describing change(see CONTRIBUTING.rst for details.)