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

DBT selector yaml support in build_dbt_asset_selection #22252

Open
dorothychen opened this issue Jun 3, 2024 · 0 comments
Open

DBT selector yaml support in build_dbt_asset_selection #22252

dorothychen opened this issue Jun 3, 2024 · 0 comments
Labels

Comments

@dorothychen
Copy link

What's the use case?

DBT has a powerful feature to select models via yaml configuration, where the functionality afforded by yaml is a superset of what is possible with regular string CLI params. It's especially useful to chain together selector definitions, doing something like

- name: exclude_from_main
   definition:
      method: tag
      value: exclude_from_main

- name: finance_models
   definition:
      method: tag
      value: finance
      exclude:
          - union: 
             - method: selector
                value: exclude_from_main

It would be great to bring this to dagster's DBT utilities like build_dbt_asset_selection.

The only workaround today I can think of is using the CLI directly to run models, instead of treating jobs as materializing assets. However, this isn't great either because we lose out on Dagster functionality like rerun from failure.

Ideas of implementation

No response

Additional information

For now, we're writing our own parsing functions, limited to the yaml fields most used.

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

@rexledesma rexledesma added the integration: dbt Related to dagster-dbt label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants