User Tools

Site Tools


transformations:trimtable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

transformations:trimtable [2015/04/17 09:01] – created dmitrytransformations:trimtable [2023/10/05 00:33] (current) dmitry
Line 1: Line 1:
-===== Trim Table =====+{{ transformations:TrimTableAction.png}} 
 +====== TRIM TABLE ====== 
 +Category: Transform / Filters\\
  
-This transformation keeps only or removes first or last N rows of a table. It's suitable for showing top N results or removing bottom row with total numbers.+\\  
 +=====Description===== 
 +This action keeps or removes the first or last N rows.\\
  
-EXAMPLE+\\ 
 +=====Use cases===== 
 +Keep only the top N significant items (e.g. top 10 products by sales volume) for a report or dashboard.
  
-**Source table:** The longest rivers in the world+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.
  
-^  River  ^  Length (km)  ^  Continent +Remove extraneous metadata from the top or bottom of a dataset.\\
-| Nile  |  6650  |  Africa +
-| Amazon  |  6400  |  South America +
-| Yangtze  |  6300  |  Asia  | +
-| Mississippi  |  6275  |  North America +
-| Yenisei  |  5539  |  Asia  | +
-| Yellow River  |  5464  |  Asia  | +
-| Ob  |  5410  |  Asia  | +
-| Paraná  |  4880  |  South America  |+
  
 +\\ 
 +=====Action settings=====
 +^Setting ^Description ^
 +|Keep only/Remove|Select whether N number of 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<sup>*</sup>|Enter/Select the number of rows to keep/remove.|
 +<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].
  
-**Objective:** Keep the three top rows in the table+\\  
 +=====Examples===== 
 +**Example:** Keep the top three longest rivers.\\ 
 +\\  
 +**Table:** The longest rivers in the world (in descending order by length) 
 +^River  ^Length (km)  ^Continent 
 +| Nile  |  6650|Africa 
 +| Amazon  |  6400|South America 
 +| Yangtze  |  6300|Asia 
 +| Mississippi  |  6275|North America 
 +| Yenisei  |  5539|Asia 
 +| Yellow River  |  5464|Asia 
 +| Ob  |  5410|Asia 
 +| Paraná  |  4880|South America 
 +\\  
 +**Action parameters:** 
 +> Keep or Remove is "Keep" 
 +> Top or Bottom is "Top" 
 +> Number of rows is "3" 
 +\\  
 +**Result table:** 
 +^River  ^Length (km)  ^Continent 
 +| Nile  |  6650|Africa 
 +| Amazon  |  6400|South America 
 +| Yangtze  |  6300|Asia  |
  
-**Trim mode*+\\  
-  * Keep only top rows+====Community examples==== 
 +  [[https://community.easymorph.com/t//1312/2|A way to obtain all positions of a char in text]] ([[https://community.easymorph.com/uploads/short-url/2lIBiIZXyCaizzyOl1nTkfleYfL.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Table 2//; Action position: //3//) 
 +  [[https://community.easymorph.com/t//1870/4|Send email - Add table extract to outlook email message]] ([[https://community.easymorph.com/uploads/short-url/xnfDuDCTN6iJgA4pEcQQsRIZET3.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Input dataset with prepended headers row//; Action position: //2//) 
 +  [[https://community.easymorph.com/t//1972/2|Read Data with two line header]] ([[https://community.easymorph.com/uploads/short-url/4YFQxslIv3pmgtF2eRywf4wpcFQ.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Read, Mark groups//; Action position: //2//) 
 +  * [[https://community.easymorph.com/t//2185/4|Transform parsed JSON to right format]] ([[https://community.easymorph.com/uploads/short-url/z1JsbbyueYletNwNg1VlSef2C4C.morph|Project]]; Module: //Main//; Group: //Group 1//; Table: //Imported table 1.dset//; Action position: //4//)
  
 +\\ 
 +=====See also=====
 +  * [[transformations:keepremovematching|Keep/remove matching]]
 +  * [[transformations:trimbycondition|Trim table by condition]]
  
-**Transformation parameters:** 
-  * Number of rows: 3 
- 
-**Output table:** 
- 
-^  River  ^  Length (km)  ^  Continent  ^ 
-| Nile  |  6650  |  Africa  | 
-| Amazon  |  6400  |  South America  | 
-| Yangtze  |  6300  |  Asia  | 
transformations/trimtable.1429275707.txt.gz · Last modified: 2015/04/17 09:01 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki