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

Support associating tests to multiple parents, if they have multiple parents #978

Open
tatiana opened this issue May 17, 2024 · 4 comments · May be fixed by #1433
Open

Support associating tests to multiple parents, if they have multiple parents #978

tatiana opened this issue May 17, 2024 · 4 comments · May be fixed by #1433
Assignees
Labels
area:testing Related to testing, like unit tests, integration tests, etc customer request An Astronomer customer made requested this dbt:test Primarily related to dbt test command or functionality
Milestone

Comments

@tatiana
Copy link
Collaborator

tatiana commented May 17, 2024

Original discussion in: #751 (comment)

Cosmos can improve its implementation towards tests with multiple parents - we should make it consistent with dbt.

@tatiana tatiana added this to the 1.6.0 milestone May 17, 2024
@dosubot dosubot bot added area:testing Related to testing, like unit tests, integration tests, etc dbt:test Primarily related to dbt test command or functionality labels May 17, 2024
@kzajaczkowski
Copy link

I was about to raise an issue about this and found this ticket. We're having an issue with dbt relationship testing while using DbtTaskGroup operator.

Let's say we have two models model1 and model2, where model2 references model1. We define relationship test on model2 column column1 referencing model1.column1.

When we run a dag with DbtTaskGroup selecting these 2 models. Tests for model1 will fail, because model2 doesn't exist. Cosmos will run the relationship test twice -- in testing nodes for each of the models.

Changing test_indirect_selection option in ExecutionConfig() doesn't help, because each Airflow task node only selects one dbt model, so test_indirect_selection doesn't really apply here.

When using dbt build command, this will work correctly, because dbt will execute relationship test only once after both model1 and model2 were run.

@tatiana
Copy link
Collaborator Author

tatiana commented Jul 5, 2024

@kzajaczkowski do you think you may be able to contribute with this feature? We could aim to release it in the next Cosmos release, if so!

@tatiana tatiana added the triage-needed Items need to be reviewed / assigned to milestone label Jul 5, 2024
@kzajaczkowski
Copy link

@tatiana, thank you, but unfortunately, I wouldn't be able to contribute at this time.

@tatiana tatiana modified the milestones: Cosmos 1.6.0, Cosmos 1.7.0 Jul 30, 2024
@tatiana tatiana modified the milestones: Cosmos 1.7.0, Triage Sep 20, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 21, 2024
@tatiana tatiana mentioned this issue Dec 5, 2024
1 task
@tatiana tatiana added customer request An Astronomer customer made requested this and removed stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed triage-needed Items need to be reviewed / assigned to milestone labels Dec 5, 2024
@tatiana tatiana self-assigned this Dec 16, 2024
@tatiana tatiana modified the milestones: Triage, Cosmos 1.8.1 Dec 27, 2024
@tatiana tatiana linked a pull request Dec 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:testing Related to testing, like unit tests, integration tests, etc customer request An Astronomer customer made requested this dbt:test Primarily related to dbt test command or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants