When running a dbt model with the --empty flag and upstream_prod_enabled: False, dbt generates the sql from the ref() to include where false limit 0 which is what we would expect. However, when running with upstream_prod_enabled: True, the additional where condition is not included.
Ideally, the where condition is still included so we can take advantage of both the upstream_prod and --empty optimizations.
When running a dbt model with the
--empty
flag andupstream_prod_enabled: False
, dbt generates the sql from the ref() to includewhere false limit 0
which is what we would expect. However, when running withupstream_prod_enabled: True
, the additional where condition is not included.Ideally, the where condition is still included so we can take advantage of both the upstream_prod and
--empty
optimizations.See https://docs.getdbt.com/reference/commands/run#the---empty-flag