transformations:keepremovecolumns
Table of Contents
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's 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 columns | The chosen columns are kept and all other columns are removed from the dataset. |
Remove selected columns | The chosen columns are removed. You are unable to remove all columns from a dataset. |
Fail if selected column(s) not found | Check 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 the column "Continent".
Before (source table)
River | Length (km) | Continent |
---|---|---|
Nile | 6650 | Africa |
Amazon | 6400 | South America |
Yangtze | 6300 | Asia |
Mississippi | 6275 | North America |
After (result table)
River | Length (km) |
---|---|
Nile | 6650 |
Amazon | 6400 |
Yangtze | 6300 |
Mississippi | 6275 |
Action parameters:
Columns to remove: Continent
Example #2
Keep only the "River" and "Continent" columns - remove all others.
Before (source table)
River | Length (km) | Continent |
---|---|---|
Nile | 6650 | Africa |
Amazon | 6400 | South America |
Yangtze | 6300 | Asia |
Mississippi | 6275 | North America |
After (result table)
River | Continent |
---|---|
Nile | Africa |
Amazon | South America |
Yangtze | Asia |
Mississippi | North America |
Action parameters:
Columns to keep: River, Continent
Community examples
- Split Excel spreadsheets into multiple spreadsheets (Project; Module: Main; Group: Tab 1; Table: Table 1; Action position: 2)
- Rounding time to the nearest minute (Project; Module: Main; Group: Tab 1; Table: Table 1; Action position: 3)
- Data cleaning for data spread over multiple rows and columns (Project; Module: Main; Group: Tab 1; Table: Table 1(3);
Action position: 2) - Update existing data in a database table (Project; Module: Main; Group: Tab 1; Table: Where clause; Action position: 4)
- Matrix multiplication (Project; Module: Main; Group: Group 1; Table: Matrix multiplication; Action position: 7)
- API pagination how I create loop (Project; Module: baseProcess; Group: Pull data from API; Table: iterationCalculation;
Action position: 6)
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: 2025/01/11 17:45 by craigt