https://dagster.io/ logo
#ask-ai
Title
# ask-ai
s

Shane Kalepp

02/20/2024, 2:56 PM
Why does my asset group for a dbt model not properly update even though it's properly coded? For example we have it set to go to the 'Loss' group, but in Staging and Prod it goes under the 'default' group.
Copy code
- name: stg_af_group_loss
    description: "A staging table for AF Group Loss Run"
    columns:
      - name: pkey
        description: "The primary key for this table"
        tests:
          - unique
          - not_null
    config:
      meta:
        dagster:
          group: Loss
s

Scout

02/20/2024, 2:56 PM
Based on the documentation, the default behavior for assigning groups to dbt models loaded from
load_assets_from_dbt_project
and
load_assets_from_dbt_manifest
has changed. Instead of using the model’s subdirectory to assign a group name, the group name is now assigned using the dbt model’s [dbt group](https://docs.getdbt.com/docs/build/groups). If you want to revert to the previous behavior where the group name is derived from the model's subdirectory, you can use the
group_from_dbt_resource_props_fallback_to_directory
utility function. Here is an example from the documentation on how to use this function:
Copy code
python from dagster_dbt import group_from_dbt_resource_props_fallback_to_directory  load_assets_from_dbt_project(     ...,     node_info_to_group_fn=group_from_dbt_resource_props_fallback_to_directory, )
If you are experiencing issues with the asset group not updating correctly, it could be due to several reasons: 1. The new behavior is being applied, and the dbt group property is not set or recognized in your dbt project. 2. There might be a mismatch between the group name specified in the dbt model's
meta
configuration and the actual group name being used by Dagster. 3. There could be a caching issue or a need to refresh the asset definitions in your Dagster instance. To troubleshoot this issue, you can: - Ensure that your dbt project is using the correct group property as per dbt's documentation. - Verify that the
meta
configuration in your dbt model is correctly set up to specify the desired group name. - Check if you need to use the
group_from_dbt_resource_props_fallback_to_directory
function to maintain the previous behavior. - Refresh your asset definitions or clear any caches that might be causing the old configuration to persist. If the issue persists after checking these points, it may be beneficial to look into the specific implementation details and any error messages or logs that could provide more insight into the problem.
2 Views