{"record":{"id":"5a47b3540cdf310d","repo":"dbt-labs/dbt-core","slug":"unknown-method-on-adapter-object-name","errorCode":null,"errorMessage":"Unknown method on adapter object: '{name}'","messagePattern":"Unknown method on adapter object: '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/mod.rs","lineNumber":4386,"sourceCode":"                    })?\n                    .downcast_object::<AgateTable>()\n                    .ok_or_else(|| {\n                        minijinja::Error::new(\n                            minijinja::ErrorKind::InvalidOperation,\n                            \"get_csv_data: argument must be an AgateTable\",\n                        )\n                    })?;\n                self.get_csv_data(table)\n            }\n            \"get_credentials\" => self.get_credentials(args),\n            \"render_equals\" => {\n                let iter = ArgsIter::new(name, &[\"expr1\", \"expr2\"], args);\n                let expr1 = iter.next_arg::<&str>()?;\n                let expr2 = iter.next_arg::<&str>()?;\n                iter.finish()?;\n                self.render_equals(state, expr1, expr2)\n            }\n            _ => Err(minijinja::Error::new(\n                minijinja::ErrorKind::UnknownMethod,\n                format!(\"Unknown method on adapter object: '{name}'\"),\n            )),\n        }\n    }\n\n    /// ClickHouse: `adapter.get_credentials(connection_overrides)` — connection\n    /// parameters for dictionary SOURCE clauses. See [AdapterImpl::get_credentials].\n    pub fn get_credentials(&self, args: &[Value]) -> Result<Value, minijinja::Error> {\n        let iter = ArgsIter::new(\"get_credentials\", &[\"connection_overrides\"], args);\n        let overrides = iter.next_arg::<Option<&Value>>()?;\n        iter.finish()?;\n        match &self.inner {\n            Typed { adapter, .. } => {\n                Ok(adapter.get_credentials(overrides.unwrap_or(&Value::UNDEFINED)))\n            }\n            Parse(_) => Ok(empty_map_value()),\n        }","sourceCodeStart":4368,"sourceCodeEnd":4404,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/mod.rs#L4368-L4404","documentation":"The adapter object exposed to Jinja dispatches method calls by name against a fixed match table. Any method name not present in that table raises `UnknownMethod` with `Unknown method on adapter object: '{name}'`. This is a typo/version-coverage guard: the requested adapter method is not implemented (or not yet registered) for this adapter object.","triggerScenarios":"A Jinja macro calls `adapter.some_method(...)` where `some_method` is misspelled, is dbt-core-specific and not ported to this Rust adapter, or is adapter-specific (e.g. a ClickHouse-only macro running against another adapter's object).","commonSituations":"Ported dbt-core macros calling Python adapter APIs that have no Rust equivalent yet; typos in custom macros; materializations shared across adapters invoking methods only some adapters implement; version drift after upgrading where a method was renamed or removed.","solutions":["Check the spelling of the method name against the adapter's implemented method list (the match table in crates/dbt-adapter/src/adapter/mod.rs).","If the method is legitimately missing, implement/override it via the adapter's dispatch or use an available equivalent (e.g. `dispatch('...')` to a macro implementation).","Guard adapter-specific calls in macros behind adapter-type checks so ClickHouse-only methods are not invoked elsewhere.","Verify macro/adapter version compatibility after upgrading dbt or the adapter."],"exampleFix":"// before (Jinja)\n{% set cols = adapter.get_columns_in_relation_(relation) %}\n// after\n{% set cols = adapter.get_columns_in_relation(relation) %}","handlingStrategy":"fallback","validationCode":"{# Jinja: feature-detect the method before relying on it #}\n{% set has_method = adapter is mapping and method_name in adapter %}","typeGuard":null,"tryCatchPattern":"{# Jinja: wrap risky adapter calls with a dispatch fallback #}\n{% set result = adapter.dispatch('get_columns_in_relation')(relation) %}\n{# or #}\n{% if execute and adapter_type == 'clickhouse' %}\n  {{ adapter.clickhouse_only_method() }}\n{% endif %}","preventionTips":["Verify method names against the adapter's dispatch table before use.","Use `adapter.dispatch('<name>')` instead of hard-coding adapter-specific methods.","Guard adapter-specific calls with `adapter_type` checks.","After upgrades, grep custom macros for adapter.* calls and confirm each still exists."],"tags":["jinja","unknown-method","adapter"],"backgroundTag":"method-not-implemented","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"}