Skip to main content

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​

InputTypeRequiredDefaultWhat it is
TableTableYesSource table.
NameStringYesNew column name.
Default valueAnyNoValue for every existing row; empty when not set.
PositionNumberNoZero-based column position; at the end when empty.
Source tableTableNoTable whose column is copied into the new column, row by row; rows it does not have get the default value.
Source columnStringNoName of the column of source_table to copy.
Source column indexNumberNoZero-based index of the column of source_table to copy; used when source_column is empty.
Column typeStringNoConvert the new column's values to this type; kept as they are when empty.

Outputs​

OutputTypeWhat it is
tableTableUpdated table.