Hi all, How would I go about getting schema and t...
# ask-community
Hi all, How would I go about getting schema and table names from a dbt asset? I tried following https://docs.dagster.io/integrations/dbt#defining-downstream-dependencies but the
for my pipeline. additionally I am using alias' in the DBT project so the asset key does not correspond with the table name, I am also setting the schema in the config so this information is also required
🤖 1
hi @Oliver! Ideally, your asset keys would match pretty closely to your actual table names, but I see how using alias would make is so that the default table asset keys that we generate would not correspond to the "real" table names. When you call
, there's a
argument, which you can set to a function which takes in a dictionary of node info (from the
file https://schemas.getdbt.com/dbt/manifest/v6/index.html#nodes_additionalProperties), and returns the asset key you want to use. I think you should be able to set this up to more accurately reflect the table name for your use case
ah awesome, thanks 😄
🎉 1