{"record":{"id":"cc30dbf164b1f9f5","repo":"dbt-labs/dbt-core","slug":"table-join-columns-must-be-a-sequence-of-column-n","errorCode":null,"errorMessage":"Table.join: columns must be a sequence of column names: {e}","messagePattern":"Table\\.join: columns must be a sequence of column names: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-agate/src/join.rs","lineNumber":108,"sourceCode":"}\n\n/// Parse the `columns` argument of the `Table.join` method.\n///\n// ```\n// :param columns:\n//     A sequence of column names from :code:`right_table` to include in\n//     the final output table. Defaults to all columns not in\n//     :code:`right_key`. Ignored when :code:`full_outer` is :code:`True`.\n// ```\n//\n// `None` means \"all columns not in right_key\" (the default), `Some([])` means\n// \"no columns\", and `Some([name1, name2, ...])` means \"only these columns\".\nfn selected_right_table_columns(columns: Option<&Value>) -> Result<Option<Vec<String>>, Error> {\n    let Some(columns) = columns else {\n        return Ok(None);\n    };\n    let iter = columns.try_iter().map_err(|e| {\n        Error::new(\n            ErrorKind::InvalidArgument,\n            format!(\"Table.join: columns must be a sequence of column names: {e}\"),\n        )\n    })?;\n    let mut names = Vec::new();\n    for column in iter {\n        match column.as_str() {\n            Some(name) => names.push(name.to_string()),\n            None => {\n                return Err(Error::new(\n                    ErrorKind::InvalidArgument,\n                    format!(\n                        \"Table.join: columns must be a sequence of column names: {column} found instead\"\n                    ),\n                ));\n            }\n        }\n    }","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-agate/src/join.rs#L90-L126","documentation":"selected_right_table_columns failed to deserialize the 'columns' argument of Table.join into a sequence of strings: the value is either not a list or its entries are not strings, so the right-table column selection for the join output can't be determined.","triggerScenarios":"Thrown at crates/dbt-agate/src/join.rs:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a list of column-name strings, or omit 'columns' entirely (defaults to all non-key columns)","Ensure right-table column names are strings, coercing with |map('string') if needed","Use Some([]) explicitly when no extra columns should be included"],"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"}