I'm trying to figure out how to feed a dbt asset i...
# integration-dbt
I'm trying to figure out how to feed a dbt asset into an op using the new API (for example, I want to read in a dbt table and send an email based on some calculations):
Copy code
def all_dbt_assets(context: OpExecutionContext, dbt: DbtCli):

def my_job():
but I'm not defining an I/O manager so the job doesn't know how to load the table
🤖 1
I'm using a source asset since I'd rather not have the job re-run the dbt model, but if that's easier, I'd accept that
We have APIs for specifying downstream dependencies for certain dbt models: https://github.com/dagster-io/dagster/discussions/14964
I read through that, but all the examples are of downstream assets - and I have a downstream op. Would it be helpful to add my use case to the discussion?
I think what you need is an io manager for the dbt assets. Then in the
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 that
thanks @Qwame! that was it - I somehow overlooked that the new
decorator has an
argument 🤦