{"record":{"id":"b026606342140460","repo":"dbt-labs/dbt-core","slug":"name-is-not-a-valid-argument","errorCode":null,"errorMessage":"'{name}' is not a valid argument","messagePattern":"'(.+?)' is not a valid argument","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/relation_object.rs","lineNumber":706,"sourceCode":"impl Object for QuotePolicyObject {\n    fn call_method(\n        self: &Arc<Self>,\n        _state: &State,\n        name: &str,\n        args: &[Value],\n        _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>);","sourceCodeStart":688,"sourceCodeEnd":724,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/relation_object.rs#L688-L724","documentation":"This dispatcher handles attribute access on a quote-policy-like object that only exposes `database`, `schema`, and `identifier`. Any other attribute name raises this InvalidArgument error. It is raised at object-attribute lookup time from Jinja, not at ordinary function call time.","triggerScenarios":"Accessing an attribute other than `database`, `schema`, or `identifier` on this object in a template, e.g. `policy.quoting` or `policy.name`.","commonSituations":"Template code assuming the object is a full relation (which has many more attributes) when it is actually a narrowed three-field quoting object; typos; accessing Python dbt fields like `quote_character` that are not ported.","solutions":["Only access `database`, `schema`, or `identifier` on this object.","If you need other relation attributes, obtain them from the full relation object instead of this quoting/policy wrapper.","Check for typos between the template attribute name and the three supported names."],"exampleFix":"// before\n{{ policy.quoting }}\n// after\n{{ policy.database }}.{{ policy.schema }}.{{ policy.identifier }}","handlingStrategy":"validation","validationCode":"{% set allowed = ['database', 'schema', 'identifier'] %}\n{% if attr not in allowed %}{% do log('attribute ' ~ attr ~ ' not available on quote policy', true) %}{% endif %}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat this object as a 3-field record: database, schema, identifier only.","Pull other relation data from the full relation object, not the policy wrapper.","Avoid dynamic attribute access (`policy[name]`) on this object."],"tags":["jinja","attribute","invalid-argument"],"backgroundTag":"invalid-argument","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"}