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

Add support for "test_name" select/exclude to DbtDag & DbtTaskGroup parsers #92

Closed
chrishronek opened this issue Jan 23, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@chrishronek
Copy link
Contributor

chrishronek commented Jan 23, 2023

See dbt docs on the test_name method here.

$ dbt test --select test_name:unique            # run all instances of the `unique` test
$ dbt test --select test_name:equality          # run all instances of the `dbt_utils.equality` test
$ dbt test --select test_name:range_min_max     # run all instances of a custom schema test defined in the local project, `range_min_max`

Ultimately, in our parsers, we should be able to have a new parameter that looks something like this:

# (Either the select or exclude parameter would be specified with the unique test_name - not both)
jaffle_shop = DbtTaskGroup(
    ...
    select={'test_names' : ['unique']} # run all instances of the `unique` test
    exclude={'test_names' : ['unique']} # run all instances not of the `unique` test
)
@chrishronek chrishronek added the enhancement New feature or request label Jan 23, 2023
@chrishronek chrishronek changed the title Create an Airflow DAG/Task Group by using "test_name" selector Add support for "test_name" selector to DbtDag & DbtTaskGroup parsers Jan 24, 2023
@chrishronek chrishronek changed the title Add support for "test_name" selector to DbtDag & DbtTaskGroup parsers Add support for "test_name" select/exclude to DbtDag & DbtTaskGroup parsers Jan 24, 2023
@tatiana
Copy link
Collaborator

tatiana commented Sep 29, 2023

Complementing, as of Cosmos 1.x, this functionality only works on LoadMode.DBT_LS. We should also support it when the DAG/TaskGroup uses LoadMode.DBT_MANIFEST and LoadMode.CUSTOM.

Copy link

dosubot bot commented Jan 30, 2024

Hi, @chrishronek! I'm helping the Cosmos team manage our backlog and am marking this issue as stale.

It looks like you requested adding support for the "test_name" select/exclude to DbtDag & DbtTaskGroup parsers. There was a mention in the comments that as of Cosmos 1.x, this functionality only works on LoadMode.DBT_LS and there was a suggestion to support it for other load modes as well.

Could you please confirm if this issue is still relevant to the latest version of the Cosmos repository? If it is, please let the Cosmos team know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you! Dosu

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jan 30, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants