Insert column
Add a column at the end or at a zero-based position, filled with a default value or with the values of a column of another table.
Command in the Data Table toolkit · id ooa.datatable/insert_column · 8 inputs (2 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Table | Table | Yes | Source table. | |
| Name | String | Yes | New column name. | |
| Default value | Any | No | Value for every existing row; empty when not set. | |
| Position | Number | No | Zero-based column position; at the end when empty. | |
| Source table | Table | No | Table whose column is copied into the new column, row by row; rows it does not have get the default value. | |
| Source column | String | No | Name of the column of source_table to copy. | |
| Source column index | Number | No | Zero-based index of the column of source_table to copy; used when source_column is empty. | |
| Column type | String | No | Convert the new column's values to this type; kept as they are when empty. |
Outputs
| Output | Type | What it is |
|---|---|---|
| table | Table | Updated table. |