{"record":{"id":"70502e12f30859af","repo":"dbt-labs/dbt-core","slug":"key-must-be-a-string","errorCode":null,"errorMessage":"key must be a string","messagePattern":"key must be a string","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/config_v2.rs","lineNumber":658,"sourceCode":"    }\n}\n\nimpl Object for RelationComponentConfigChangeSet {\n    fn call_method(\n        self: &Arc<Self>,\n        _state: &minijinja::State,\n        name: &str,\n        args: &[Value],\n        _listeners: &[Rc<dyn RenderingEventListener>],\n    ) -> Result<Value, minijinja::Error> {\n        // TODO: ArgsIter\n        let mut parser = ArgParser::new(args, None);\n        match name {\n            // support example `_configuration_changes.changes.get(\"tags\", None)`\n            \"get\" => {\n                let key = parser.get::<Value>(\"key\")?;\n                let key = key.as_str().ok_or_else(|| {\n                    minijinja::Error::new(\n                        minijinja::ErrorKind::InvalidArgument,\n                        \"key must be a string\",\n                    )\n                })?;\n\n                Ok(self\n                    .changes\n                    .get(key)\n                    .map(|v| v.to_jinja())\n                    .unwrap_or_else(none_value))\n            }\n            \"has_changes\" => Ok(Value::from(!self.changes.is_empty())),\n            \"requires_full_refresh\" => Ok(Value::from(self.requires_full_refresh())),\n            _ => Err(minijinja::Error::new(\n                minijinja::ErrorKind::UnknownMethod,\n                format!(\"RelationComponentConfigChangeSet has no method named '{name}'\"),\n            )),\n        }","sourceCodeStart":640,"sourceCodeEnd":676,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/config_v2.rs#L640-L676","documentation":"The 'get' method on the RelationComponentConfigChangeSet Jinja object requires its key argument to be a string; as_str() returned None because a number/object/sequence was passed (e.g. changes.get(tags) without quotes).","triggerScenarios":"Thrown at crates/dbt-adapter/src/relation/config_v2.rs:658 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the key as a string literal, e.g. _configuration_changes.changes.get('tags', None)","Quote the key in the template","Coerce non-string keys with |string where appropriate"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}