transformations:trimtable
Table of Contents
TRIM TABLE
Category: Transform / Filters
Description
This action keeps or removes the first or last N rows.
Use cases
- Keep only the top N significant items (e.g. top 10 products by sales volume) for a report or dashboard.
- Reduce the size of a larger dataset to a specific number of rows during the initial build of a workflow. Remove or disable the Trim table action when the workflow is complete, to process the entire dataset.
- Remove extraneous metadata from the top or bottom of a dataset.
Action settings
Setting | Description |
---|---|
Keep only/Remove | Select whether rows will be kept or removed. |
Top/Bottom | Select whether the rows at the top or bottom of the table will be kept/removed. |
N rows* | Enter/Select the number of rows to keep/remove. |
* Setting can be specified using a parameter.
Examples
Example #1
Remove the 2 rows of metadata (heading and underline) from the top of the table.
Before (source table)
Mountain | Height (m) |
---|---|
Tallest Mountains | |
————————- | |
Mt. Everest | 8848.86 |
K2 | 8611 |
Kangchenjunga | 8586 |
After (result table)
Mountain | Height (m) |
---|---|
Mt. Everest | 8848.86 |
K2 | 8611 |
Kangchenjunga | 8586 |
Action parameters
Keep only/Remove: Remove
Top/Bottom: Top
N rows: 2
Example #2
Keep the top 3 rows of the table and remove the rest.
Before (source table)
Mountain | Height (m) |
---|---|
Mt. Everest | 8848.86 |
K2 | 8611 |
Kangchenjunga | 8586 |
Lhotse | 8516 |
Makalu | 8485 |
Cho Oyu | 8188 |
After (result table)
Mountain | Height (m) |
---|---|
Lhotse | 8516 |
Makalu | 8485 |
Cho Oyu | 8188 |
Action parameters
Keep only/Remove: Keep
Top/Bottom: Bottom
N rows: 3
Community examples
- A way to obtain all positions of a char in text (Project; Module: Main; Group: Tab 1; Table: Table 2; Action position: 3)
- Send email - Add table extract to outlook email message (Project; Module: Main; Group: Tab 1; Table: Input dataset with prepended headers row; Action position: 2)
- Read Data with two line header (Project; Module: Main; Group: Tab 1; Table: Read, Mark groups; Action position: 2)
- Transform parsed JSON to right format (Project; Module: Main; Group: Group 1; Table: Imported table 1.dset; Action position: 4)
See also
transformations/trimtable.txt · Last modified: 2025/01/21 20:15 by craigt