User Tools

Site Tools


transformations:repeatrows

Differences

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

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
transformations:repeatrows [2020/11/27 16:43] – created dmitrytransformations:repeatrows [2021/07/17 23:33] craigt
Line 1: Line 1:
-===== Repeat Rows =====+{{ transformations:RepeatRowsAction.png}} 
 +====== REPEAT ROWS ====== 
 +Category: Transform / Advanced\\
  
-Repeats each row as many times as specified in given column.+\\  
 +=====Description===== 
 +Repeats each row as many times as specified in given column.  In the output dataset, the selected column will contain an enumeration of the rows from 1 to n (the number of times the row is repeated).\\
  
-**Example** 
  
-Table before: +\\  
-Date Shifts +=====Action settings===== 
-2020-Nov-16  |  3 | +^Setting^Description
-| 2020-Nov-17   |+|Column with counts|Select the column that contains the number of times the row should be repeated.|
  
-Goal: expand the table so that there is one row per each shift every day. Apply the action to the "Shift" column.+\\  
 +=====Examples=====
  
-Table after:+**Objective:** Expand the table so there is one row per shift, every day.\\ 
 +\\   
 +**Source table:** 
 +^ Date ^ Shifts ^ 
 +| 2020-Nov-16  |   3 | 
 +| 2020-Nov-17  |   2 | 
 +\\  
 +**Action parameters:** 
 +> Column with counts:  "Shifts" 
 +\\  
 +**Result table:**
 ^ Date ^ Shifts ^ ^ Date ^ Shifts ^
 | 2020-Nov-16  |  1 | | 2020-Nov-16  |  1 |
Line 20: Line 34:
 | 2020-Nov-17  |  2 | | 2020-Nov-17  |  2 |
  
 +\\ 
 +====Community examples====
 +  * [[https://community.easymorph.com/t//1297/3|Use case for Repeat Rows]] ([[https://community.easymorph.com/uploads/short-url/rdUnMPy0VfogVZOnROOoH2JaVUT.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Table 2//; Action position: //3//)
 +  * [[https://community.easymorph.com/t//2580/6|Parsing Exceptionally Complex Column]] ([[https://community.easymorph.com/uploads/short-url/18twYeVICxpKyR13IU4TQn2MNnm.morph|Project]]; Module: //Main//; Group: //Group 1//; Table: //Table 2 (parsed)//; Action position: //6//)
 +  * [[https://community.easymorph.com/t//2646/4|Iterate same row in table a known number of times]] ([[https://community.easymorph.com/uploads/short-url/vfoRlVfxozi5f8GpH7ISOtSsquO.morph|Project]]; Module: //Main//; Group: //Group 1//; Table: //Table 1//; Action position: //3//)
  
-** See also **+\\  
 +=====See also=====
   * [[transformations:crossmerge|Cross merge]]   * [[transformations:crossmerge|Cross merge]]
  
transformations/repeatrows.txt · Last modified: 2021/07/19 02:19 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki