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

Slackbot

02/21/2024, 7:43 PM
This message was deleted.
s

Scout

02/21/2024, 7:43 PM
Based on the documentation, when you encounter an error indicating that multiple dbt resources are configured with identical Dagster asset keys, it means that there is a conflict in the asset key configuration. Each dbt resource should generate a unique Dagster asset key to avoid such conflicts. The documentation provides guidance on customizing asset keys generated by Dagster for dbt assets. You can define a
meta
key on your dbt node's
.yml
file to override the asset key for a source and table. For example:
Copy code
yaml
sources:
  - name: jaffle_shop
    tables:
      - name: orders
        meta:
          dagster:
            asset_key: ["snowflake", "jaffle_shop", "orders"]
In your case, it seems that the asset key
["dw_raw_sql_server_crm"]
is being used by multiple dbt resources, which is causing the error. To resolve this, you need to ensure that each dbt resource has a unique asset key specified in the
meta
configuration. For the specific resource you mentioned (
new_countrybase
), you have already specified a unique asset key:
Copy code
yaml
tables:
  - name: new_countrybase
    meta:
      dagster:
        asset_key: ["dw_raw_sql_server_crm", "new_countrybase"]
However, the error message suggests that there is another dbt resource (
source.DBT_AUTOMOTIVE.dw_raw_sql_server_crm_dbo.new_countrybase
) that is also using the asset key
['dw_raw_sql_server_crm']
. You will need to check the configuration for that resource and ensure that it has a unique asset key. If necessary, you can use the
meta
configuration to specify a different asset key for that resource as well. If you continue to experience issues after ensuring unique asset keys, it may be helpful to review the documentation on customizing asset keys and ensure that your dbt project's configuration aligns with the guidelines provided there. Asset depend on themselves using dagster... button \ is generated on windows for DBT assets button Dagster Docs button KeyError when loading dbt semantic model... button Thank you for your feedback!