Skip to content

Rename Column

Type: rename-column  ·  Package: DataTable Activities v1.0.5  ·  Output: DataTable

Changes the name of a column of a DataTable and returns a new table. Useful to normalize headers before combining tables with Join, or to give readable names to columns that come from a source with unclear titles.

Copies the table and renames column to newName, keeping its position, type and data. The lookup of column is case-insensitive. The original table does not change.

ParameterTypeDefaultDescription
tableDataTable—The DataTable to modify.
columnstring—Current column name.
newNamestring—New name. It must not match another existing column.

None.

Returns a new DataTable, identical to the original except for the column name.

MessageCause and fix
'table' must be a DataTable.table does not evaluate to a DataTable.
'column' is required. / 'newName' is required.The current or the new name is missing.
Column '…' not found.The column to rename does not exist. Check the name.
A column named '…' already belongs to this DataTable.newName is already the name of another column (.NET message). Remove that column first with Drop Column or pick another name.
Rename Column table = data column = "col1" newName = "Customer" → output: readable
Join DataTable left = readable right = customers on = "Customer" → output: complete