Field Renamer

The Field Renamer processor renames fields in a record using the selected method, such as replacing a specified string, removing a prefix, or replacing strings using regular expressions.

You can use multiple rename methods in a single processor. When you specify multiple rename configurations, the processor performs each rename configuration before moving onto the next, in the listed order.

When you configure a rename configuration, you specify the rename method to use and related properties.

Rename Methods

The Field Renamer can rename fields using the following methods:
Replace field name
Replaces an entire field name. You specify the name of the field to find and the replacement name. Use this method to rename a single field.
The replacement is case sensitive by default, replacing only the field name that exactly matches the specified field name. You can configure the processor to ignore case when evaluating field names.
For example, you can use this method to rename the ID field to UserId.
Remove prefix
Removes a specified prefix. You specify one or more characters to remove from the beginning of field names.
The replacement is case sensitive by default, but you can configure the processor to ignore case when searching for the characters to remove.
For example, you can use this method to remove the user. prefix from the user.firstName and USER.lastName fields, resulting in firstName and lastName.
Remove suffix
Removes a specified suffix. You specify one or more characters to remove from the end of field names.
The replacement is case sensitive by default, but you can configure the processor to ignore case when searching for the characters to remove.
For example, you can use this method to remove the .US suffix from the State.US and City.us fields, resulting in State and City.
Remove text (any location)
Removes a set of characters from any location in field names. You specify one or more characters to remove.
The replacement is case sensitive by default, but you can configure the processor to ignore case when searching for the characters to remove.
For example, you can use this method to remove -user from the original-User.name and original-user.ID fields, resulting in original.name and original.ID.
Find and replace by regular expression
Replaces a set of characters using regular expressions. You specify a regular expression of the pattern to find. The find pattern is case sensitive by default, but you can configure the processor to ignore the case. Then, you specify the pattern for the replacement.
For example, you can use this method to find characters that match the user[.]? regular expression and replace it with no text, changing username and user.ID to name and ID.
Find and replace by characters
Replaces a character with a specified character. You specify the character to find and the replacement character.
The replacement is case sensitive by default, but you can configure the processor to ignore case when searching for the character to replace.
For example, you can use this method to replace an underscore with a period, changing the user_name and user_ID fields to user.name and user.ID.
Change case
Changes the case of all field names. You specify whether field names should be lowercase, upper case, or title case. Title case capitalizes the first letter of each word.
For example, you can use this method to change all field names to uppercase, such as changing addr1 and addr2 to ADDR1 and ADDR2.

Configuring a Field Renamer Processor

Configure a Field Renamer processor to rename one or more fields in records.

  1. In the Properties panel, on the General tab, configure the following properties:
    General Property Description
    Name Stage name.
    Description Optional description.
    Cache Data Caches data processed for a batch so the data can be reused for multiple downstream stages. Use to improve performance when the stage passes data to multiple stages.

    Caching can limit pushdown optimization when the pipeline runs in ludicrous mode.

  2. On the Rename tab, configure the following properties:
    Renamer Property Description
    Rename Fields Sets of renaming configuration properties. When you define multiple configurations, the processor performs them in the listed order.

    To define additional configurations, click the Add icon.

    You can use simple or bulk edit mode to configure the property. Use bulk edit mode to easily change the configuration order.

    Rename Type Method used to rename fields. Select one of the following options:
    • Replace Field Name - Replaces a field name with a specified field name.
    • Remove Prefix - Removes characters from the beginning of field names.
    • Remove Suffix - Removes characters from the end of field names.
    • Remove Text (any location) - Removes a group of characters from any location in the field names.
    • Find and Replace by Regular Expression - Uses regular expressions to find and replace a set of characters.
    • Find and Replace by Characters - Replaces a single character in field names.
    • Change Case - Changes the case of all field names.
  3. Configure additional properties depending on the rename type that you select:
    When using Replace Field Name, configure the following additional properties:
    Replace Field Name Property Description
    Case Insensitive Use to replace field names with non-matching cases, such as replacing storeid when you specify storeID as the field name to replace.

    By default, the replacement is case sensitive.

    Field Name Field name to replace.
    New Field Name Field name to use for the replacement.

    When using Remove Prefix, configure the following additional properties:

    Remove Prefix Property Description
    Case Insensitive Use to remove prefixes with non-matching cases, such as removing West- when you specify WEST- as the prefix to remove.

    By default, the removal is case sensitive.

    Remove Text Characters to remove from the beginning of field names.
    When using Remove Suffix, configure the following additional properties:
    Remove Suffix Property Description
    Case Insensitive Use to remove suffixes with non-matching cases, such as removing .eu when you specify .EU as the suffix to remove.

    By default, the removal is case sensitive.

    Remove Text Characters to remove from the end of field names.
    When using Remove Text (any location), configure the following additional properties:
    Remove Text Property Description
    Case Insensitive Use to remove text with non-matching cases, such as removing store when you specify STORE as the text to remove.

    By default, the removal is case sensitive.

    Remove Text Consecutive characters to remove from any location in field names.
    When using Find and Replace by Regular Expression, configure the following additional properties:
    Find and Replace by Regular Expression Property Description
    Case Insensitive Use to replace text with non-matching case.

    By default, the replacement is case sensitive.

    Find Pattern Regular expression that represents the characters that you want to replace.
    Replace Pattern Regular expression that represents the characters that you want to use in the replacement.
    When using Find and Replace by Characters, configure the following additional properties:
    Find and Replace by Characters Property Description
    Case Insensitive Use to replace text with non-matching case.

    By default, the replacement is case sensitive.

    Find Pattern Single character to replace in field names.
    Replace Pattern Single replacement character.
    When using Change Case, configure the following additional properties:
    Change Case Property Description
    Target Case Case to use for all field names:
    • Upper case - Changes all characters to uppercase.
    • Lower case - Changes all characters to lowercase.
    • Title case - Capitalizes the first character of each field name.