{"record":{"id":"a3181a3311681f83","repo":"dbt-labs/dbt-core","slug":"is-uniform-config-model-is-required-e","errorCode":null,"errorMessage":"is_uniform: config.model is required: {e}","messagePattern":"is_uniform: config\\.model is required: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/mod.rs","lineNumber":2962,"sourceCode":"    /// https://github.com/databricks/dbt-databricks/blob/bfcb5c7c7714e97e67023119f674d2938b04acb0/dbt/adapters/databricks/impl.py#L256C6-L256C7\n    ///\n    /// ```python\n    /// def is_uniform(self, config: BaseConfig) -> bool:\n    /// ```\n    #[tracing::instrument(skip(self, state), level = \"trace\")]\n    pub fn is_uniform(&self, state: &State, args: &[Value]) -> Result<Value, minijinja::Error> {\n        match &self.inner {\n            Typed { adapter, .. } => {\n                if adapter.adapter_type() != AdapterType::Databricks {\n                    unimplemented!(\"is_uniform is only supported in Databricks\")\n                }\n\n                let iter = ArgsIter::new(\"is_uniform\", &[\"config\"], args);\n                let config_val = iter.next_arg::<&Value>()?;\n                iter.finish()?;\n\n                let model_val = config_val.get_attr(\"model\").map_err(|e| {\n                    minijinja::Error::new(\n                        minijinja::ErrorKind::InvalidArgument,\n                        format!(\"is_uniform: config.model is required: {e}\"),\n                    )\n                })?;\n                let config = minijinja_value_to_typed_struct::<ModelConfig>(config_val.clone())\n                    .map_err(|e| {\n                        minijinja::Error::new(\n                            minijinja::ErrorKind::SerdeDeserializeError,\n                            e.to_string(),\n                        )\n                    })?;\n                let node = minijinja_value_to_typed_struct::<InternalDbtNodeWrapper>(model_val)\n                    .map_err(|e| {\n                        minijinja::Error::new(\n                            minijinja::ErrorKind::SerdeDeserializeError,\n                            e.to_string(),\n                        )\n                    })?;","sourceCodeStart":2944,"sourceCodeEnd":2980,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/mod.rs#L2944-L2980","documentation":"Raised in `is_uniform` when `config.get_attr(\"model\")` fails because the config argument has no `model` attribute. `is_uniform` needs config.model to determine whether the model targets a Uniform catalog, so a config missing this attribute is an InvalidArgument error.","triggerScenarios":"Calling `is_uniform(config)` with a dict or object lacking `model`, or with an unrelated config-like object; also when config.model was renamed or omitted by the calling macro.","commonSituations":"Custom macros probing uniform support with hand-built config dicts; passing a partial config in tests; internal changes to where the model reference lives on config.","solutions":["Provide a config object that includes a `model` attribute referencing the model node","Prefer the model's real config object (model.config) in callers","Guard with `config.get('model') is defined` / `is not none` before invoking","Check the suffix of the message for the underlying attribute error"],"exampleFix":"// before (Jinja)\n{% if is_uniform({'materialized': 'view'}) %}...{% endif %}\n// after\n{% if is_uniform(model.config) %}...{% endif %}","handlingStrategy":"validation","validationCode":"{% if config is not mapping or config.get('model') is none %}\n  {{ exceptions.raise_compiler_error(\"is_uniform requires config with a model attribute\") }}\n{% endif %}","typeGuard":null,"tryCatchPattern":"{% set cfg = config if (config is mapping and config.get('model')) else model.config %}\n{% if is_uniform(cfg) %}...{% endif %}","preventionTips":["Call is_uniform(model.config) rather than with synthetic dicts","Guard for the model attribute before calling","Update uniform-related macros when config schema changes"],"tags":["jinja","adapter","uniform","missing-attribute"],"backgroundTag":"missing-required-config-field","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}