[Bug] "Schema does not exist" error during on-end-run hooks with dbt build
#4063
Labels
bug
Something isn't working
good_first_issue
Straightforward + self-contained changes, good for new contributors!
Milestone
Is there an existing issue for this?
Current Behavior
When using
dbt build
, the database is throwing a "schema does not exist" error during on-run-end hooks that invoke ourgrant_select_on_schemas
macro. The error does not occur when usingdbt run
.It seems like
...dbt_test__audit
is being included in theschemas
variable duringbuild
, even though I haven't used the--store_failures
flag.Expected Behavior
Consistent behavior between
build
&run
; only schemas that are known to exist at the end of the run should be included in theschemas
variable.Steps To Reproduce
DROP
all dev schemasdbt build
on all or a subset of models; note the error during hook rundbt run
on the same subset of models; note no errorRelevant log output
No response
Environment
What database are you using dbt with?
redshift
Additional Context
No response
The text was updated successfully, but these errors were encountered: