Skip to main content
Skip table of contents

Rename

Overview

The Rename tool adds a prefix or suffix to the name of every field in the record, or removes one. You can use Rename when joining two tables in order to avoid duplicate field names in the "wide" record of the Join tool output. It also helps identify the source of each field in the "wide" record. This technique is especially useful if you want to join two tables together, perform some calculations between the fields of the "wide" record, and then split the record apart again into separate tables.

Renaming fields in this manner lets you address the fields from the Left and Right inputs much as you would the columns of an SQL query involving multiple tables. Once you have made assignments between the fields of the "wide" record, you split the fields of the Left and Right tables using the Select tool, and then remove the Right field prefixes to restore the Right record schema to its original form.

You can rename individual fields using the Select tool.

Rename tool configuration parameters

The Rename tool has a single set of configuration parameters in addition to the standard execution options.

Parameter

Description

Action

Specify whether to add or remove characters from the input field names, or alter them using a user-defined expression. This is optional and defaults to Add.

Position

Specify the field-name component to add or remove. This is optional and defaults to Prefix.

Value

Specify the prefix or suffix to add or remove.

Expression

If Action is Expression, the expression to be evaluated (using FIELDNAME for the existing field name) to generate the new field name.

Configure the Rename tool

  1. Select the Rename tool.

  2. Go to the Configuration tab on the Properties pane.

  3. Select Action and choose Add, Remove, or Expression.

  4. If you selected Add or Remove in step 2:

    • Select Position and select either Prefix or Suffix to indicate the field-name component to add or remove.

    • Select Value and type the field-name component you want to add or remove.

For example, the configuration in the following image would rename the fields of a typical name/address table as in the table below.

Old Name

New Name

NAME

NAME_RIGHT

ADDRESS

ADDRESS_RIGHT

CITY

CITY_RIGHT

STATE

STATE_RIGHT

ZIP

ZIP_RIGHT

  1. To reverse this operation, you would configure another Rename tool like this.

  1. If you selected Expression in step 2, enter an Expression to be evaluated (using FIELDNAME for the existing field name) to generate the new field names. For example, the expression "Customer_" + FIELDNAME + "_output" would generate field names like Customer_ID_output and Customer_Company_output.

  2. Optionally, go to the Execution tab, and then set Web service options.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.