Binh Pham
12/06/2022, 9:33 PMalias
config?
dbt model with the file name my_schema___my__table.sql
{{ config(alias="my_table") }}}
SELECT 1
the asset key will be my_schema / my_schema___my__table
downstream asset using dagster-snowflake io manager
@asset(
in={"my_schema__mytable": AssetIn(key_prefix=["my_schema"])
...
)
def my_asset(my_schema__my_table: DataFrame):
...
the io manager would do a select * from <http://my_schema.my|my_schema.my>__schema____my__table
, which doesnt existowen
12/06/2022, 9:41 PMnode_info_to_asset_key
parameter into your load_assets_from_dbt... function. This would be a function that takes a dictionary of information about each dbt model and returns an asset key. You can see the default implementation here: https://sourcegraph.com/github.com/dagster-io/dagster/-/blob/python_modules/libraries/dagster-dbt/dagster_dbt/asset_defs.py?L132:5. In your case, I think you'd like to use node_info.get("alias") or node_info["name"]
in place of node_info["name"]
in your functionBinh Pham
12/06/2022, 10:06 PM