dbt defer to production manifest

This is not exactly how defer should be used. With the command you specified: “dbt build -s +my_model --defer --state prod_manifest” you actually say you want to build all models, where you actually want to build “my_model” only, and make it refer to the preceding models using links.

I think you are almost there, it seems you need to run “dbt build -s my_model --defer --state prod_manifest” (without the +).

For the test operation, your + will work, because then the defer will just make sure that you are testing the production tables.
“dbt test -s +my_model --defer --state prod_manifest”

For “run” and I believe “compile”, it will behave as the “build” example.

1 Like