https://dagster.io/ logo
Title
j

Jonathan Mak

07/30/2021, 2:15 PM
How can I use dbt flag
--full-refresh
when using dagster-dbt? I tried to do something like
context.resources.dbt.run(models=[m], full_refresh = full_refresh)
And got the run command compiled but I get this error when it actually tries to run
dagster_dbt.errors.DagsterDbtCliFatalRuntimeError: Fatal error in the dbt CLI (return code 2)
e

Emily

07/30/2021, 2:23 PM
are you able to see what the CLI was actually trying to run? it should be above that error in the run logs i believe
j

Jonathan Mak

07/30/2021, 2:34 PM
@Emily this
/Users/jonathan.mak/github/dagster/venv/bin/dbt --log-format json run --project-dir /Users/jonathan.mak/github/dagster/geografisk --profiles-dir /Users/jonathan.mak/github/dagster/ --models staging.manual --full-refresh
This runs normally locally but not on Dagster (also run locally)
Do you use
dagster-dbt
to run with
--full-refresh
?
e

Emily

07/30/2021, 2:38 PM
all the stuff before dbt i feel like shouldnt be there?
/Users/jonathan.mak/github/dagster/venv/bin/dbt
ours starts like
dbt --log-format json run ...
j

Jonathan Mak

07/30/2021, 2:43 PM
Yep that’s me testing stuff but the command works on dbt without
--full-refresh
I am guessing if the output object requires each dbt flag to have a value
My bad! Fixed. I was doing something hacky
full_refresh = ' '
but should have done
full_refresh = True
👍 1
a

Abednego Santoso

01/26/2022, 7:21 AM
hello, sorry to jump in. Is it possible to run --full-refresh in dbt rpc?