Dynamic Rename tool icon

Dynamic Rename Tool

Last modified: November 08, 2021

Docs are available before the release of Designer Cloud so you can get a sneak peek. This content might change between now and the official release.

One Tool Example

Dynamic Rename has a One Tool Example. Visit Sample Workflows to learn how to access this and many other examples directly in Alteryx Designer.

Use Dynamic Rename to rename columns in upstream data. Use this tool to parse text files, to pull column headers from the first row of data or a description file, or to rename a pattern in the column headers, like removing a prefix or replacing underscores with spaces.

Configure the Tool

Select a Rename Mode:

  • Formula
  • Add Prefix
  • Add Suffix
  • Remove Prefix
  • Remove Suffix
  • Use 1st Row Headers as Column Headers
  • Use Descriptions from R Input's Metadata
  • Use Headers from R Input's Metadata
  • Use Rows from R Input as Column Headers
  • Use R Input's Rows as Descriptions

Formula

Columns are renamed based on an expression you build. To build an expression that renames columns, enter text directly in the expression editor, or drag or double-click a variable or function to add it to the Expression Editor.

Select the Columns to Rename by checking the column header or by checking Check All.

  • Select Dynamic or Unknown Columns so columns not present at the time of configuration are renamed at runtime.
  • _CurrentField_ is the individual column the formula is applied to. Each column selected from the list has the formula applied to it.

Add Prefix/Suffix

Selected columns are renamed to include a prefix or suffix.

  • In Enter Prefix or Enter Suffix, enter a prefix or suffix to each selected column header. The New Column Name is updated with an example column header with the new prefix or suffix.

Remove Prefix/Suffix

Selected columns are renamed to exclude a prefix or suffix.

  • In Enter Prefix or Enter Suffix, enter the prefix or suffix to remove from each selected column header.
  • If Prefixes Are Not Removed, select the report behavior: 
    • Warn (Continue Data Processing)
    • Error (Stop Data Processing)
    • Ignore (Continue Data Processing)

Use 1st Row's Data As Column Headers

Selected columns are renamed by turning the column name into the data found in the 1st row.

  • If Number of Columns Differ, select the report behavior: 
    • Warn (Continue Data Processing)
    • Error (Stop Data Processing)
    • Ignore (Continue Data Processing)

Column Rename Example

For example, a dataset contains this data:

Column 1 Column 2 Column 3
Address City ZIP
3825 Iris Ave Boulder 80301

If the columns are renamed with the column headers from the 1st row of data, the dataset changes to: 

Address City ZIP
3825 Iris Ave Boulder 80301

Use Descriptions from R Input's Metadata

Selected columns are updated so the new column headers match the column descriptions from a second input that is connected to the R anchor. Descriptions are updated based on the positions in each input.

  • If the Number of Columns and Rows Differ, select the report behavior: 
    • Warn (Continue Data Processing)
    • Error (Stop Data Processing)
    • Ignore (Continue Data Processing)

Use Headers from R Input's Metadata

Selected columns are updated so the new column headers match the headers from a data stream that is connected to the R anchor. 

  • Check Use R Input Anchor's Data Type and Size to keep the data type and size from the values retrieved  from the input anchor.
  • If the Number of Columns and Rows Differ, select the report behavior: 
    • Warn (Continue Data Processing)
    • Error (Stop Data Processing)
    • Ignore (Continue Data Processing)

Use Rows from R Input as Column Headers

Selected columns' headers are updated using the rows from a second input that is connected to the R anchor.

  • Select a Rename Method:
    • Use Column Position reassigns column headers based on their row position in relation to the column position on the left.
    • Select Use Lookup Values from the R Input Anchor to select from the Column with Lookup Values consisting of R input columns, which includes the new replacement column headers.
  • Select the Column with Rename Values from the list of R input column headers, which includes the old column headers.
  • If the Number of Columns and Rows Differ, select the report behavior: 
    • Warn (Continue Data Processing)
    • Error (Stop Data Processing)
    • Ignore (Continue Data Processing)

Use R Input's Rows as Descriptions

Selected columns are updated so the descriptions match the descriptions from the input rows of a 2nd input that is connected to the R anchor.

  • Select a Rename Method:
    • Use Column Position reassigns column headers based on their row position in relation to the column position on the left.
    • Select Use Lookup Values from the R Input Anchor to select from the Column with Lookup Values consisting of R input columns, which includes the new replacement column headers.
  • Select the Column with Rename Values from the list of R input column headers, which includes the old column headers.
  • If the Number of Columns and Rows Differ, select the report behavior: 
    • Warn (Continue Data Processing)
    • Error (Stop Data Processing)
    • Ignore (Continue Data Processing)

Troubleshooting

  • When you use an R input for column headers, double check the row order. A Join or similar tool can change the order of rows, which can result in incorrect column header assignments.
  • Some of the Rename Mode names have changed from Designer Desktop. Use this table to match the Designer Cloud Rename Mode names to the Designer Desktop names.

    Designer Cloud Name Designer Desktop Name
    Use 1st Row Headers as Column Headers Take Field Names from First Row of Data
    Use Descriptions from R Input's Metadata

    Take Field Descriptions from Right Input Metadata

    Use Headers from R Input's Metadata

    Take Field Name from Right Input Metadata

    Use Rows from R Input as Column Headers

    Take Field Names from Right Input Rows

    Use R Input's Rows as Descriptions

    Take Field Descriptions from Right Input Rows

Was This Page Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support. Can't submit this form? Email us.