Is it possible to disable certain dbt asset checks...
# ask-ai
t
Is it possible to disable certain dbt asset checks by using dbt tags?
s
Yes, it is possible to disable certain dbt asset checks by using dbt tags. According to the documentation, you can use the
build_dbt_asset_selection
function to create an asset selection based on dbt tags. For example, you can select dbt assets that have a specific tag and exclude them from being loaded as asset checks. This is demonstrated in the documentation with the following code snippet:
Copy code
python from dagster_dbt import dbt_assets, build_dbt_asset_selection  @dbt_assets(manifest=...) def all_dbt_assets():     ...  # Select the dbt assets that have the tag "foo". foo_selection = build_dbt_asset_selection([dbt_assets], dbt_select="tag:foo")  # Exclude the dbt assets that have the tag "foo". exclude_foo_selection = build_dbt_asset_selection([dbt_assets], dbt_exclude="tag:foo")
Additionally, there is an ongoing discussion and a feature request tracked in GitHub issues that specifically addresses the ability to enable asset checks for a subset of dbt tests, potentially based on tags. This indicates that the feature is recognized as valuable and is being considered for further development.