Chris Chan
07/17/2023, 5:45 PM@dbt_assets(
manifest=manifest
)
def all_dbt_assets(context: OpExecutionContext, dbt: DbtCli):
...
@job
def my_job():
my_op(all_dbt_assets.to_source_asset(key=manifest.get_asset_key_for_model(model_name="my_dbt_model")))
but I'm not defining an I/O manager so the job doesn't know how to load the tableChris Chan
07/17/2023, 5:48 PMrex
07/17/2023, 8:05 PMChris Chan
07/17/2023, 8:08 PMQwame
07/18/2023, 3:43 AMload_input
function of the io manager, connect to the database and do a select star from the dbt asset and return the results as a dataframe. Could be pandas or polars. I'd recommend polars though. It's be nice if an io manager like that came out of the box from dagster that uses the underlying dbt adapter to connect to the warehouse and get the results. But at the moment, we don't have thatChris Chan
07/18/2023, 1:37 PM@dbt_assets
decorator has an io_manager_key
argument 🤦