{"record":{"id":"fbae3e4eaf911367","repo":"dbt-labs/dbt-core","slug":"only-available-with-databricks-adapter","errorCode":null,"errorMessage":"only available with Databricks adapter","messagePattern":"only available with Databricks adapter","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/adapter_impl.rs","lineNumber":4337,"sourceCode":"                        node.schema().trim_end_matches('/'),\n                        node.alias()\n                    )\n                } else {\n                    format!(\"{}/{}\", location_root.trim_end_matches('/'), node.alias())\n                };\n\n                let path = if is_incremental {\n                    format!(\"{path}_tmp\")\n                } else {\n                    path\n                };\n                Ok(path)\n            }\n\n            Postgres | Snowflake | Bigquery | Redshift | Salesforce | Spark | DuckDB\n            | LakeCompute | Fabric | ClickHouse | Exasol | Starburst | Athena | Trino\n            | Datafusion | Dremio | Oracle => {\n                unimplemented!(\"only available with Databricks adapter\")\n            }\n        }\n    }\n\n    /// DatabricksAdapter https://github.com/databricks/dbt-databricks/blob/2f11abb306a400cde32b27891b766bf41a11fb1f/dbt/adapters/databricks/impl.py#L298\n    pub fn update_tblproperties_for_uniform_iceberg(\n        &self,\n        state: &State,\n        conn: &mut dyn Connection,\n        config: ModelConfig,\n        node: &InternalDbtNodeWrapper,\n        tblproperties: &mut IndexMap<String, Value>,\n        token: CancellationToken,\n    ) -> AdapterResult<()> {\n        match self.adapter_type() {\n            adapter_type @ Databricks => {\n                // TODO(anna): Ideally from_model_config_and_catalogs would just take in an InternalDbtNodeWrapper instead of a Value. This is blocked by a Snowflake hack in `snowflake__drop_table`.\n                let node_yml = node.as_internal_node().serialize();","sourceCodeStart":4319,"sourceCodeEnd":4355,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/adapter_impl.rs#L4319-L4355","documentation":"compute_external_path builds the storage location path for Databricks external tables from location_root plus the model's database/schema/alias; it is a Databricks-only API (dbt-databricks impl.py#L307). On every other adapter the match falls through to unimplemented!() and panics.","triggerScenarios":"Calling adapter.compute_external_path(config, node, is_incremental) when the adapter is not Databricks — typically from an external-table materialization macro running against Snowflake, BigQuery, DuckDB, etc.","commonSituations":"External-table macros written for dbt-databricks are reused in a non-Databricks project; a model with location_root/external config is targeted at the wrong warehouse; multi-target projects where the Databricks macro set runs for all targets.","solutions":["Wrap the call in an adapter.type() == 'databricks' guard in the materialization macro","Ensure models using external tables are only selected when targeting Databricks","Set location_root in the Databricks warehouse config so the Databricks path (not the panic arm) is taken"],"exampleFix":"{% if adapter.type() == 'databricks' %}\n  {% set path = adapter.compute_external_path(config, model, is_incremental) %}\n{% else %}\n  {# non-Databricks external path handling #}\n{% endif %}","handlingStrategy":"type-guard","validationCode":"{% if adapter.type() == 'databricks' and config.get('location_root') %}\n  {# safe to call compute_external_path #}\n{% endif %}","typeGuard":"fn is_databricks(adapter: &AdapterImpl) -> bool { adapter.adapter_type() == AdapterType::Databricks }","tryCatchPattern":"// unimplemented! panics; gate the call on adapter type\nif adapter.adapter_type() == AdapterType::Databricks {\n    let path = adapter.compute_external_path(config, node, is_incremental)?;\n}","preventionTips":["Only enable external-table materializations for Databricks targets","Require location_root in Databricks warehouse config so the Databricks path is used","Audit shared macros for unconditional external-path calls"],"tags":["adapter","databricks","external-tables","unimplemented"],"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-14T16:17:12.679Z"}