The problem I’m having
When I run dbt compile --defer --state ./prod-run-artifacts
I am getting an error
Runtime Error
Compilation Error in model my_model (models/my_model.sql)
In get_column_values(): relation `my_project`.`my_dataset`.`my_model_stg` does not exist and no default value was provided.
> in macro statement (macros/etc/statement.sql)
> called by macro default__get_column_values (macros/sql/get_column_values.sql)
> called by macro get_column_values (macros/sql/get_column_values.sql)
> called by model my_model (models/my_model.sql)
But when I run dbt compile -s my_model --defer --state ./prod-run-artifacts
I get no error.
Why does the --defer --state work when I select a specific model but not get passed through when I omit -s flag?
The context of why I’m trying to do this
I want to compile and run dbt docs generate without having to build certain models in my personal dev schema and want to defer to our prod manifest.json for those models instead
I am using dbt-bigquery v1.7.7