{"record":{"id":"2c935c3dca3749c7","repo":"dbt-labs/dbt-core","slug":"is-uniform-is-only-supported-in-databricks","errorCode":null,"errorMessage":"is_uniform is only supported in Databricks","messagePattern":"is_uniform is only supported in Databricks","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/mod.rs","lineNumber":2954,"sourceCode":"                Ok(Value::from_serialize(&tblproperties))\n            }\n            Parse(_) => Ok(empty_map_value()),\n        }\n    }\n\n    /// Is table UniForm Iceberg\n    ///\n    /// 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                        )","sourceCodeStart":2936,"sourceCodeEnd":2972,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/mod.rs#L2936-L2972","documentation":"The `is_uniform` adapter method checks whether a table is managed via Databricks Uniform (Iceberg); it is gated to the Databricks adapter and panics with `unimplemented!` for every other adapter type. Because 'Uniform' is a Databricks-only concept, the generic Adapter wrapper refuses to execute the method elsewhere. The panic occurs before any argument parsing, so even valid arguments cannot prevent it on a non-Databricks adapter.","triggerScenarios":"Calling `adapter.is_uniform(state, [config])` from Jinja while the active adapter's type is not AdapterType::Databricks — e.g. checking uniform status in a macro executed on Snowflake or BigQuery.","commonSituations":"Databricks-specific models copied into a multi-warehouse project; shared packages that call is_uniform without an adapter-type guard; switching targets in CI so Databricks macros run against other warehouses.","solutions":["Guard the call with an adapter-type check (`adapter.type() == 'databricks'`) and return a sensible default (e.g. false/None) for other adapters.","Ensure models calling is_uniform are only selected when running on the Databricks target.","Refactor shared macros so Databricks-only logic lives in Databricks-dispatched macros."],"exampleFix":"// before\n{% set uniform = adapter.is_uniform(config) %}\n// after\n{% set uniform = adapter.is_uniform(config) if adapter.type() == 'databricks' else false %}","handlingStrategy":"type-guard","validationCode":"// Jinja\n{% set is_databricks = adapter.type() == 'databricks' %}","typeGuard":"fn supports_uniform(a: &Adapter) -> bool {\n    a.adapter_type() == AdapterType::Databricks\n}","tryCatchPattern":"// Branch instead of catching\n{% set uniform = false %}\n{% if adapter.type() == 'databricks' %}\n  {% set uniform = adapter.is_uniform(config) %}\n{% endif %}","preventionTips":["Default is_uniform to false on non-Databricks adapters","Gate models that check Uniform behind Databricks-only configs","Avoid calling is_uniform from shared macros without dispatch"],"tags":["unimplemented","databricks","iceberg","adapter"],"backgroundTag":"operation-not-supported","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}