Slackbot
02/21/2024, 7:43 PMScout
02/21/2024, 7:43 PMmeta
key on your dbt node's .yml
file to override the asset key for a source and table. For example:
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:
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!