NOTE: Transforms are a part of the underlying language that is not directly accessible to users. This content is maintained for reference purposes only.

Renames one or more columns based on specified names, patterns, row values, or prefixes and suffixes.

NOTE: Column names are case-insensitive and cannot begin with whitespace.

Tip: To prevent potential issues with downstream systems, you should limit your column lengths to no more than 128 characters.

Other ways to rename:

It's easier to rename columns through the user interface.

To rename a single column, double-click the column name or select Rename... from the column drop-down.

To rename multiple columns, you can select values in the Column Browser and perform batch renames. See Rename Columns.

Transforms that generate new columns might support the as parameter, which enables specifying the name of the new column. Using the as parameter avoids the extra step of adding a rename transform after column generation.

on

For batch rename using find and replace, this parameter specifies the pattern or string literal to use to match values.

Replacement values are specified with the with parameter.

Usage Notes:

Required?

Data Type

No

String (pattern or literal)

with

For batch rename using find and replace, this parameter specifies the literal string values with which to replace the found pattern.

Find patterns and values are specified with the on parameter.

Usage Notes:

Required?

Data Type

No

String (pattern or literal)

sourcerownumber

The row number from the original source data which contains the values to use to rename all columns in the dataset. The row is removed from its original position.

NOTE: If source row number information is no longer available, this method cannot be used for column rename.

Usage Notes:

Required?

Data Type

No

Integer (Positive value)

Examples

Rename a column

In the following dataset, the length columns do not include any units of measure.

Tip: For downstream consumption, any column that contains a measure should include the units of measure in the column name. Avoid including units of measure in cell values, which forces the column to be retyped as String type.

Source:

Object

LengthX

LengthY

LengthZ

ObjA

10

20

30

ObjB

3

4

5

ObjC

6

9

12

Transform:

Perhaps you know the units are centimeters. You can rename using the following:

rename mapping: [LengthX, 'LengthX_cm']

Now, you want to convert the units of measure to inches. You can use the derive transform to convert values and generate a new column name:

derive type:single value: (LengthX_cm * 0.393701) as:'LengthX_in'

You might want to reformat the generated values using transforms like the following, which rounds the results to two decimal points: