https://dagster.io/ logo
#dagster-support
Title
# dagster-support
o

Oliver

08/02/2022, 10:01 PM
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
upstream_output
is
None
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
o

owen

08/02/2022, 10:06 PM
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
load_assets_from_dbt_project
, there's a
node_info_to_asset_key
argument, which you can set to a function which takes in a dictionary of node info (from the
manifest.json
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
o

Oliver

08/02/2022, 10:14 PM
ah awesome, thanks 😄
🎉 1