dbt-labs/dbt-core · error

update_tblproperties_for_uniform_iceberg: config.model is…

Error message

update_tblproperties_for_uniform_iceberg: config.model is required: {e}

What it means

Raised in `update_tblproperties_for_uniform_iceberg` when `config.get_attr("model")` fails, meaning the config object passed in has no `model` attribute. The function requires config.model to locate the node whose table properties should be updated, so a config without this attribute is rejected with InvalidArgument.

Solutions

  1. Ensure the config object includes a `model` attribute referencing the model node
  2. Pass the model's real config (model.config) which carries the model reference, or add model=<node> explicitly
  3. Verify with a guard like config.get('model') before calling
  4. Check the underlying error text (rendered after the prefix) for the exact attribute failure

Example fix

// before (Jinja)
{{ update_tblproperties_for_uniform_iceberg({'tblproperties_option': x}, tblproperties=p) }}
// after
{{ update_tblproperties_for_uniform_iceberg(config, tblproperties=p) }}  // config.model present
Defensive patterns

Strategy: validation

Validate before calling

{% if config is not mapping or config.get('model') is none %}
  {{ exceptions.raise_compiler_error("config.model is required for update_tblproperties_for_uniform_iceberg") }}
{% endif %}

Try / catch

{% set cfg = config if (config is mapping and config.get('model')) else {'model': model} %}
{{ update_tblproperties_for_uniform_iceberg(cfg, tblproperties=p) }}

Prevention

When it happens

Trigger: Calling `update_tblproperties_for_uniform_iceberg(config, tblproperties=...)` where config is a dict or object lacking a `model` key/attribute, or where `model` was removed/renamed in the caller's construction of config.

Common situations: Hand-building a config object in a uniform/iceberg macro and forgetting the model reference; passing a generic ModelConfig-like dict that omits model; version changes where the attribute moved.

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


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/a68eab40b9f77438. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-adapter/src/adapter/mod.rs:2882

        match &self.inner {
            Typed { adapter, .. } => {
                if adapter.adapter_type() != AdapterType::Databricks {
                    unimplemented!(
                        "update_tblproperties_for_uniform_iceberg is only supported in Databricks"
                    )
                }

                let iter = ArgsIter::new(
                    "update_tblproperties_for_uniform_iceberg",
                    &["config"],
                    args,
                );
                let config_val = iter.next_arg::<&Value>()?;
                let tblproperties_val = iter.next_kwarg::<Option<Value>>("tblproperties")?;
                iter.finish()?;

                let model_val = config_val.get_attr("model").map_err(|e| {
                    minijinja::Error::new(
                        minijinja::ErrorKind::InvalidArgument,
                        format!(
                            "update_tblproperties_for_uniform_iceberg: 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,

View on GitHub (pinned to 0267ce9170)