https://dagster.io/ logo
Title
z

Zachary Bluhm

10/17/2022, 1:35 PM
Hey yall - do any of you output the actual SQL that is being executed by DBT in your dagster logs? If so, how exactly do I enable that?
:dagster-bot-responded-by-community: 1
a

Adam Bloom

10/17/2022, 2:49 PM
dbt doesn't log that - it writes it out to a file in your dbt profile's
target
directory.
z

Zachary Bluhm

10/17/2022, 2:55 PM
It does seem that if you pass in the
-d
arg that it will be output in the logs, but with a bunch of other stuff (that we'd rather not output) - But I'm not sure how to pass that arg in to the DBT cli resource
a

Adam Bloom

10/17/2022, 2:57 PM
context.resources.dbt.run(..., debug=True)
You can pass additional keyword arguments. I haven't actually tested this, but that should add the
--debug
flag to the command used to invoke dbt, which is equivalent to
-d
👍 1
z

Zachary Bluhm

10/17/2022, 3:05 PM
can you set this when creating the resource itself? i.e when calling:
dbt_cli_resource.configured()
a

Adam Bloom

10/17/2022, 3:24 PM
no, it isn't a supported config option