User Tools

Site Tools


transformations:keepremovecolumns

KEEP/REMOVE COLUMNS

Category: Transform / Basic


Description

This action keeps or removes selected columns. Several columns can be kept or removed within a single action.

The action icon will depict whether this action is in "Keep" or "Remove" mode.


Use cases

Keep columns: Useful for keeping only the selected column(s) regardless of other columns being added or deleted upstream.

Delete columns: Useful for removing columns that are unnecessary for downstream processing. Removing unneeded columns early in the process lowers the computational load on the workflow/system.


Action settings

Mode options

Setting Description
Keep selected columnsThe chosen columns are kept and all other columns are removed from the dataset.
Remove selected columnsThe chosen columns are removed. You are unable to remove all columns from a dataset.
Fail if selected column(s) not foundCheck this option on to stop the workflow with a failure if the selected column(s) is/are not in the dataset.


Columns

A list of columns found in the current dataset is presented to select which columns to keep or remove.


Examples

Example 1 (Remove columns): Remove the column describing the length of the river in miles.

Source table: The longest rivers in the world

River Length (km) Length (miles) Continent
Nile 6650 4132Africa
Amazon 6400 3976South America
Yangtze 6300 3917Asia
Mississippi 6275 3902North America


Action parameters:

Columns to remove: Length (miles)


Result table:

River Length (km) Continent
Nile 6650Africa
Amazon 6400South America
Yangtze 6300Asia
Mississippi 6275North America



Example 2 (Keep columns): Keep only the River and Continent columns - remove all others.

Source table: The longest rivers in the world

River Length (km) Length (miles) Continent
Nile 6650 4132Africa
Amazon 6400 3976South America
Yangtze 6300 3917Asia
Mississippi 6275 3902North America


Action parameters:

Columns to keep: River, Continent


Result table:

River Continent
Nile Africa
Amazon South America
Yangtze Asia
Mississippi North America


Community examples


Shortcuts

Fast ways to create the action:

Remove columns:

  • Right-click on the column heading and select Remove column from the context menu.
  • Click the drop-down arrow in the column heading and select Remove column from the context menu.
  • You can remove multiple columns by first selecting the columns to remove, then choosing Remove (#) columnsfrom the context menu.

Keep columns:

  • Right-click on the column heading and select Select column from the context menu.
  • Click the drop-down arrow in the column heading and select Select column from the context menu.
  • You can keep multiple columns by first selecting the columns to keep, then choosing Select (#) columns from the context menu.


See also

transformations/keepremovecolumns.txt · Last modified: 2024/08/14 01:08 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki