{"record":{"id":"95ecb6e9c544c4ba","repo":"dbt-labs/dbt-core","slug":"column-identifiers-must-be-a-column-name-a-column","errorCode":null,"errorMessage":"column identifiers must be a column name, a column index, or a sequence of either: {e}","messagePattern":"column identifiers must be a column name, a column index, or a sequence of either: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-agate/src/table.rs","lineNumber":189,"sourceCode":"                ),\n            ))\n        }\n    }\n\n    /// Indices of the columns identified by a Jinja value.\n    ///\n    /// `keys` may be a single column name, a single column index, or a sequence of\n    /// either (the two can be mixed).\n    ///\n    /// If a key is not found, it is simply skipped,\n    pub fn column_indices_of(&self, keys: &Value) -> Result<Vec<usize>, Error> {\n        // Strings are iterable in Jinja (by character), so single identifiers have to\n        // be handled before falling back to the sequence case below.\n        if keys.as_str().is_some() || keys.as_i64().is_some() {\n            return Ok(self.column_index_of(keys)?.into_iter().collect());\n        }\n        let iter = keys.try_iter().map_err(|e| {\n            Error::new(\n                ErrorKind::InvalidArgument,\n                format!(\n                    \"column identifiers must be a column name, a column index, or a sequence of either: {e}\"\n                ),\n            )\n        })?;\n        let mut indices = Vec::new();\n        for key in iter {\n            if let Some(idx) = self.column_index_of(&key)? {\n                indices.push(idx);\n            }\n        }\n        Ok(indices)\n    }\n\n    pub fn select<'a>(&'a self, indices: impl Iterator<Item = usize> + 'a) -> Arc<Self> {\n        // get a new FlatRecordBatch with only the selected columns\n        let flat = self.flat.select(indices);","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-agate/src/table.rs#L171-L207","documentation":"Validation in Table::column_indices_of: after handling the single name/index cases, the `keys` value could not be iterated as a sequence of column identifiers, so try_iter failed. Interpolates the underlying type error as {e}; the at-fault input is the sequence passed as column selectors.","triggerScenarios":"Thrown at crates/dbt-agate/src/table.rs:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a single column name/index or a list of names/indices","Avoid passing a single string when multiple columns are intended — strings iterate by character","Ensure the value is a Jinja-iterable (list/tuple), not a mapping or scalar object"],"exampleFix":null,"handlingStrategy":"validation","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"}