{"record":{"id":"48015a2dab08e700","repo":"dbt-labs/dbt-core","slug":"unknown-method-on-defaultquotepolicyobject-name","errorCode":null,"errorMessage":"Unknown method on DefaultQuotePolicyObject: '{name}'","messagePattern":"Unknown method on DefaultQuotePolicyObject: '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/relation_object.rs","lineNumber":712,"sourceCode":"        _listeners: &[std::rc::Rc<dyn RenderingEventListener>],\n    ) -> Result<Value, minijinja::Error> {\n        match name {\n            \"get_part\" => {\n                let iter = ArgsIter::new(\"QuotePolicy.args\", &[], args);\n                let name = iter.next_kwarg::<String>(\"name\")?;\n                iter.finish()?;\n\n                match name.as_str() {\n                    \"database\" => Ok(Value::from(self.0.database)),\n                    \"schema\" => Ok(Value::from(self.0.schema)),\n                    \"identifier\" => Ok(Value::from(self.0.identifier)),\n                    _ => Err(minijinja::Error::new(\n                        minijinja::ErrorKind::InvalidArgument,\n                        format!(\"'{name}' is not a valid argument\"),\n                    )),\n                }\n            }\n            _ => Err(minijinja::Error::new(\n                minijinja::ErrorKind::UnknownMethod,\n                format!(\"Unknown method on DefaultQuotePolicyObject: '{name}'\"),\n            )),\n        }\n    }\n}\n\n/// A Wrapper type for StaticBaseRelation\n/// for any concrete StaticBaseRelation type to be used as Object in Jinja\n/// to expose static methods via api.Relation\n#[derive(Debug, Clone)]\npub struct StaticBaseRelationObject(Arc<dyn StaticBaseRelation>);\n\nimpl StaticBaseRelationObject {\n    pub fn new(relation: Arc<dyn StaticBaseRelation>) -> Self {\n        Self(relation)\n    }\n}","sourceCodeStart":694,"sourceCodeEnd":730,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/relation_object.rs#L694-L730","documentation":"The `DefaultQuotePolicyObject`'s `call_method` dispatcher received a method name it does not implement. Only the methods matched in its arms are supported; everything else falls to this UnknownMethod error. It surfaces when template code calls a method on the quote policy object that exists on other relation objects but not on this one.","triggerScenarios":"Calling an unsupported method on a DefaultQuotePolicyObject obtained via `relation.get_default_quote_policy()`, e.g. `policy.render()` or any non-existent method name.","commonSituations":"Confusing the quote policy object with the relation object and calling relation methods on it; ported macros referencing Python-side methods not implemented here.","solutions":["Use only the methods implemented on DefaultQuotePolicyObject (see its `call_method` match arms).","Read quoting fields as attributes (`database`, `schema`, `identifier`) rather than calling methods.","If a needed method is missing, operate on the parent relation object instead of the policy object."],"exampleFix":"// before\n{% if policy.is_quoted() %}...{% endif %}\n// after\n{% set pol = relation.get_default_quote_policy() %}\n{{ pol.database }}.{{ pol.schema }}.{{ pol.identifier }}","handlingStrategy":"type-guard","validationCode":"{% if policy.get_default_quote_policy is defined %}{% endif %}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember the quote policy object exposes fields, not relation methods.","Check the call_method match arms before calling new methods on it.","Keep quoting logic limited to database/schema/identifier lookups."],"tags":["jinja","quote-policy","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-17T15:17:12.973Z"}