{"record":{"id":"291dcef2ba3aad67","repo":"dbt-labs/dbt-core","slug":"unknown-method-on-baserelationobject-name","errorCode":null,"errorMessage":"Unknown method on BaseRelationObject: '{name}'","messagePattern":"Unknown method on BaseRelationObject: '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/relation_object.rs","lineNumber":338,"sourceCode":"                self.from_config(&config)\n            }\n            // Below are available for Databricks\n            \"is_hive_metastore\" => Ok(Value::from(self.is_hive_metastore())),\n            \"enrich\" => self.relation_enrich(args),\n            \"render_constraints_for_create\" => self.relation_render_constraints_for_create(),\n            // Below are available for BigQuery and Redshift\n            \"materialized_view_config_changeset\" => {\n                let iter = ArgsIter::new(\n                    \"materialized_view_config_changeset\",\n                    &[\"relation_results\", \"relation_config\"],\n                    args,\n                );\n                let relation_results = iter.next_arg::<Value>()?;\n                let relation_config = iter.next_arg::<Value>()?;\n                iter.finish()?;\n                self.materialized_view_config_changeset(&relation_results, &relation_config)\n            }\n            _ => Err(minijinja::Error::new(\n                minijinja::ErrorKind::UnknownMethod,\n                format!(\"Unknown method on BaseRelationObject: '{name}'\"),\n            )),\n        }\n    }\n\n    fn get_value(self: &Arc<Self>, key: &Value) -> Option<Value> {\n        match key.as_str() {\n            Some(\"database\") => Some(Value::from(self.database())),\n            Some(\"schema\") => Some(Value::from(self.schema())),\n            Some(\"identifier\") | Some(\"name\") | Some(\"table\") => {\n                Some(Value::from(self.identifier()))\n            }\n\n            Some(\"is_table\") => Some(Value::from(self.is_table())),\n            Some(\"is_delta\") => Some(Value::from(self.is_delta())),\n            Some(\"alter_constraints\") => {\n                let dbx = self.relation.as_any().downcast_ref::<Relation>()?;","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/relation_object.rs#L320-L356","documentation":"The `call_method` dispatcher on `BaseRelationObject` received a method name that is not in its supported match arms. minijinja objects expose methods via this dispatcher; any name falling through the `_ =>` arm produces this UnknownMethod error. It is the Rust-side equivalent of Python's AttributeError on the relation object.","triggerScenarios":"Invoking any attribute/method on a relation object in Jinja whose name is not one of the implemented methods (e.g. a typo like `relation.schma`, or a Python dbt method that has not been ported to this Rust adapter).","commonSituations":"Migrating Python dbt macros to the Rust engine where some BaseRelation methods are not yet implemented; typos in macro code; calling adapter-specific relation methods that exist only on subclass objects.","solutions":["Check the method name spelling against the methods implemented in `relation_object.rs` (the match arms of `call_method`).","If porting a Python dbt macro, verify the equivalent Rust-side method exists; if missing, implement it in the `call_method` dispatcher or use an alternative available method.","Use `adapter.type()`-specific relation objects if the method is adapter-specific rather than the base relation object."],"exampleFix":"// before (typo)\n{% set sch = relation.schma %}\n// after\n{% set sch = relation.schema %}","handlingStrategy":"type-guard","validationCode":"{% if relation is mapping or relation is string %}{% else %}{% do log('relation object unexpected', true) %}{% endif %}","typeGuard":"// Rust side: verify the method exists before dispatch\nif !SUPPORTED_METHODS.contains(&name.as_str()) {\n    return Err(unknown_method(name));\n}","tryCatchPattern":"{% set maybe = relation.render_constraints_for_create() if relation.render_constraints_for_create is defined else none %}\n{% if maybe is none %}{% do exceptions.raise_compiler_error('method unavailable') %}{% endif %}","preventionTips":["Consult the Rust relation_object.rs method list before porting Python macros.","Use editor autocompletion / dbt's Jinja docs rather than memorized Python APIs.","Test macros per adapter to catch unported methods early."],"tags":["jinja","relation","unknown-method"],"backgroundTag":"unsupported-operation","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"}