dbt-labs/dbt-core · error
is_uniform: config.model is required
Error message
is_uniform: config.model is required: {e} What it means
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.
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
Example fix
// before (Jinja)
{% if is_uniform({'materialized': 'view'}) %}...{% endif %}
// after
{% if is_uniform(model.config) %}...{% endif %} Defensive patterns
Strategy: validation
Validate before calling
{% if config is not mapping or config.get('model') is none %}
{{ exceptions.raise_compiler_error("is_uniform requires config with a model attribute") }}
{% endif %} Try / catch
{% set cfg = config if (config is mapping and config.get('model')) else model.config %}
{% if is_uniform(cfg) %}...{% endif %} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- update_tblproperties_for_uniform_iceberg: config.model is…
- adapter not found in context
- adapter should be configured for the parse phase
- compute_external_path: Failed to deserialize config
- compute_external_path: Failed to deserialize…
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/a3181a3311681f83.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-adapter/src/adapter/mod.rs:2962
/// https://github.com/databricks/dbt-databricks/blob/bfcb5c7c7714e97e67023119f674d2938b04acb0/dbt/adapters/databricks/impl.py#L256C6-L256C7
///
/// ```python
/// def is_uniform(self, config: BaseConfig) -> bool:
/// ```
#[tracing::instrument(skip(self, state), level = "trace")]
pub fn is_uniform(&self, state: &State, args: &[Value]) -> Result<Value, minijinja::Error> {
match &self.inner {
Typed { adapter, .. } => {
if adapter.adapter_type() != AdapterType::Databricks {
unimplemented!("is_uniform is only supported in Databricks")
}
let iter = ArgsIter::new("is_uniform", &["config"], args);
let config_val = iter.next_arg::<&Value>()?;
iter.finish()?;
let model_val = config_val.get_attr("model").map_err(|e| {
minijinja::Error::new(
minijinja::ErrorKind::InvalidArgument,
format!("is_uniform: config.model is required: {e}"),
)
})?;
let config = minijinja_value_to_typed_struct::<ModelConfig>(config_val.clone())
.map_err(|e| {
minijinja::Error::new(
minijinja::ErrorKind::SerdeDeserializeError,
e.to_string(),
)
})?;
let node = minijinja_value_to_typed_struct::<InternalDbtNodeWrapper>(model_val)
.map_err(|e| {
minijinja::Error::new(
minijinja::ErrorKind::SerdeDeserializeError,
e.to_string(),
)
})?;View on GitHub (pinned to 0267ce9170)