Hi all, forgive me if I missed this in the docs, b...
# ask-community
t
Hi all, forgive me if I missed this in the docs, but I'm using the dagster-dbt API, and I would like to consume the output of one of my models within a Job. Is that possible? Any guidance would be greatly appreciated.
m
What do you mean by this? Do you want to query the model and use the results in the job?
1
Do you want to express a "run this job, after this side-effectful action, which does not produce output, has run" dependency?
One sec, resolving docs link from my brain.
Copy code
from dagster import In, Nothing, job, op


@op
def create_table_1():
    get_database_connection().execute("create table_1 as select * from some_source_table")


@op(ins={"start": In(Nothing)})
def create_table_2():
    get_database_connection().execute("create table_2 as select * from table_1")


@job
def nothing_dependency():
    create_table_2(start=create_table_1())
I'm using this a lot.
t
Thanks Manny!
m
My org hasn't approved DBT, so I'm running bigquery jobs as dagster steps lol.
It works ok.