{"record":{"id":"ac6b3b7df82cd715","repo":"dbt-labs/dbt-core","slug":"out-is-not-a-column-of","errorCode":null,"errorMessage":"'{out}' is not a column of '{}'","messagePattern":"'(.+?)' is not a column of '(.+?)'","errorType":"validation","errorClass":"IndexError","httpStatus":null,"severity":"error","filePath":"crates/dbt-index-core/src/info_schema/parse_safe.rs","lineNumber":652,"sourceCode":"        // Assembled rather than projected. `info_schema::build_own` and\n        // `epoch_views::own_sql` special-case the same table by name; this is the third\n        // place that has to, for the same reason.\n        if matches!(self.src, Src::Own) {\n            return self.dag_nodes_sql();\n        }\n\n        let spec = spec_for(Ns::Dbt, self.vocabulary).ok_or_else(|| {\n            self.err(format!(\n                \"no information-schema table named '{}'\",\n                self.vocabulary\n            ))\n        })?;\n\n        let mut selects = Vec::with_capacity(self.cols.len());\n        for out in self.cols {\n            let col =\n                spec.cols.iter().find(|c| c.out == *out).ok_or_else(|| {\n                    self.err(format!(\"'{out}' is not a column of '{}'\", spec.name))\n                })?;\n            // A column the information schema declares but assembles in code has no\n            // source name to borrow; the index column is the one that shares its name.\n            let src = if col.src.is_empty() { col.out } else { col.src };\n            selects.push(format!(\"{} AS {}\", self.qualify(src)?, quote(out)));\n        }\n\n        let from = match self.src {\n            Src::Table(table) => format!(\"{BASE_SCHEMA}.{} AS {T}\", quote(table)),\n            Src::Join {\n                left,\n                right,\n                left_on,\n                right_on,\n            } => format!(\n                \"{BASE_SCHEMA}.{} AS {L} LEFT JOIN {BASE_SCHEMA}.{} AS {R} ON {L}.{} = {R}.{}\",\n                quote(left),\n                quote(right),","sourceCodeStart":634,"sourceCodeEnd":670,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-index-core/src/info_schema/parse_safe.rs#L634-L670","documentation":"When generating the SELECT list for an information-schema view, each requested output column must exist in the registered table spec. If a requested column name (out) is not found among spec.cols, create_view_sql fails with this error naming both the column and the underlying table. It prevents generating SQL that would reference a nonexistent column.","triggerScenarios":"Building an information-schema view while requesting a column (self.cols entry) that the registered spec for the vocabulary does not declare — e.g. a typo, a column added in a newer schema version, or mixing column sets across vocabularies.","commonSituations":"A caller constructs the column list from a stale or hand-written list instead of the spec; upgrading index-core renamed or removed a column; copying a column list from a different information-schema table.","solutions":["Verify each requested column name against the spec's declared columns (spec.cols / c.out)","Upgrade dbt-index-core if the column was introduced in a newer release","Derive the column list programmatically from the spec instead of hardcoding it","Fix the typo if a column name was misspelled"],"exampleFix":"// before\ncols: vec![\"node_id\", \"cheksum\"] // typo\n// after\ncols: vec![\"node_id\", \"checksum\"]","handlingStrategy":"validation","validationCode":"let declared: Vec<_> = spec.cols.iter().map(|c| c.out.as_str()).collect();\nfor c in &cols { assert!(declared.contains(&c.as_str()), \"unknown column {c}\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build column lists from the spec, never hardcoded","Re-check column names after upgrading index-core","Lint model/docs column references against the information schema"],"tags":["information-schema","columns","sql","index-core"],"backgroundTag":"invalid-argument-value","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"}