Skip to main content

MultiColumnRename

The MultiColumnRename gem can be used to systematically rename multiple columns at once.

Parameters

FieldDescription
Select columns to renameSet of columns that you will rename.
Rename methodHow you will rename columns.
You can either add a prefix/suffix, or choose advanced rename (SQL expression).

Example

Assume you have the following table that includes the weather forecast for the next four days.

DatePredictionTemperatureCelsiusHumidityPercentWindSpeedCondition
2025-03-01156510Sunny
2025-03-02177012Cloudy
2025-03-03166811Rainy
2025-03-0414729Sunny

To standardize column names by converting them to lowercase, use the Advanced rename option in the MultiColumnRename gem with a custom SQL expression.

  1. Create a MultiColumnRename gem.

  2. Open the gem configuration and stay in the Visual view.

  3. Under Select columns to rename, select all columns.

  4. For the Rename method, choose Advanced rename.

  5. Click Select expression > Function.

  6. Search for and select the lower function.

  7. Inside of the lower function, click expr > Custom Code.

  8. Inside of the code box, write column_name. This applies the function to the column name.

  9. Click Done on the code box, and then click Save on your gem.

Result

After saving and running the gem, all selected columns will be renamed using the lower function. In this case, all column names will be lowercase in the output table.

datepredictiontemperaturecelsiushumiditypercentwindspeedcondition
2025-03-01156510Sunny
2025-03-02177012Cloudy
2025-03-03166811Rainy
2025-03-0414729Sunny