The Change Columns tool is probably the most used tool in Less. It is quite a swiss army knife that can be used for a number of things: changing the order of your columns, selecting a subset of the columns you want to keep in your dataset, renaming column names and changing the data types of your columns.

The Change Columns tool combines the Pick, Rename and Formats tool in a single tool.

Configuration

The Change Columns tool consists of one required input and three optional.

1

Select Columns

It is mandatory to select minimum one column to keep in your dataset. You can use the checkboxes to the left of the column name to keep the given column.

You can select/deselect all columns with the checkbox in the header row of the configuration window

2

Optional: Rename Columns

You can rename your column names in by entering a new name in the “Rename Column” tab in the configuration windows. This is optional.

3

Optional: Order Columns

You can change the order of when your column appears in your dataset. For instance, you might want your ID columns to be the first in your dataset. You can change the order by dragging the given column up or down with the “up/down” arrow all the way to the left in the configuration window.

4

Optional: Change Column Data type

You can change the column data type in the dropdown to the right in the configuration windows. For instance, changing a text/string column to a decimal/float data type.

You can only change text/string columns to date/datetime types. If you want to change your date/datetime column to other date formats, use the Date Format tool

When To Use

The Change Columns tool is typically the first tool to use after an Input tool take make sure your data is in the right shape. It can be used for things like:

  • Removing the columns you don’t need to increase speed and performance
  • Renaming database column names to something more meaningful
  • Reordering the order in which columns are listed in your dataset - like bringing ID columns to the first positions in your data
  • Changing a decimal columns to a whole number / integer