User Tools

Site Tools


transformations:iteratecolumns

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:iteratecolumns [2021/01/20 18:18] – created dmitrytransformations:iteratecolumns [2021/06/09 14:53] – [Description] dmitry
Line 1: Line 1:
-===== Iterate columns =====+{{ transformations:IterateColumnAction.png}} 
 +====== ITERATE COLUMN ====== 
 +Category: Workflow / Internal \\
  
-Iteratively call another module or project and pass the columns of the input dataset to the called module/project, one column in one iteration. The action allows applying the same calculation logic to all columns of a dataset and is useful for dealing with matrix tables or performing complex data quality checks for multiple columns.+\\  
 +=====Description===== 
 +Iteratively call another module or project and pass the columns of the input dataset to the called module/project, one column per iteration.
  
-The called module (or project) must have the "Inputaction in order to receive a column passed from the calling module. During iterations, the "Inputaction is populated with one column passed from the calling moduleat a time.+The called module (or project) must have the [[transformations:input|Input]] action in order to receive a column passed from the calling module. During iterations, the //Input// action is populated with one column passed from the calling module at a time. The column will be automatically given a specific temporary name that can be used in module calculations, thus making it possible to apply the same calculation logic to many columns with different names.
  
-Note that the action automatically renames columns and gives them a specified name when they are passed to the called module. As a result, the "Input" action of the called module always one column with the same name, no matter what it was called in the calling action. This allows using workflow designed for one column name for all columns in the source dataset.+\\ 
 +=====Use cases===== 
 +The action allows applying the same calculation logic to all columns of a dataset and is useful for dealing with matrix tables or performing complex data quality checks for multiple columns.
  
-{{ :undefined:iterate-column-schema.png?nolink |}} 
  
-Optionally, the resulting datasets of the called module can be appended side to side into one tabular dataset. In this case, only the column with the same name as in "Input" will be returned back to the calling module and renamed back to its original name. Other columns from the result table will be ignored and discarded. 
  
-Action settings:+\\  
 +=====Action settings===== 
 +^Setting^Description^ 
 +|Module/Project to run<sup>*</sup>|Select whether to call a module (within the current project), or an external project (.morph file), then select the\\ module, or browse to the project file.| 
 +|Column name|Enter the name that will be assigned to all columns as they are passed to the called module.| 
 +|Mode|Choose whether to just iterate the called module (or project) and //not// return any results, or iterate and return\\ columns.  Options //Iterate, ignore results// or //Iterate, append result columns// (and select the Result table from\\ the called module or project; returned columns will be appended side-by-side).| 
 +|Assign parameters|Select the parameter(s) in the called module (or project) to pass values in through, and enter the associated value(s)<sup>*</sup> (can be a text/number, or parameter).| 
 +|Exclude selected columns|Check to exclude selected columns from being iterated. Select the columns to be skipped and not be sent to the called module.| 
 +<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
  
-^ Setting  ^ Description  ^ +\\  
-| Module to run  | The module or project to be executed. Can be specified by a parameter.  | +=====Remarks===== 
-| Column name    | The column name that will be assigned to all columns when they are passed to the called module.  | +Note that the action automatically gives the columns a specified name when they are passed to the called module. As a result, the [[transformations:input|Input]] action of the called module always contains one column with the same nameregardless of what it was called in the calling action. This allows using a workflow designed for one column name to work over all columns in the source dataset.
-| Mode           | "Iterate, ignore results" - do not return result tables from the called module.\\ "Iterateappend result columns" - return columns from the called module, and appended side-to-side. +
-| Exclude selected columns  | The selected columns (if any) will be skipped and not be sent to the called module |+
  
-=== See also ===+{{ :undefined:iterate-column-schema.png?nolink |}}
  
 +Optionally, the resulting datasets of the called module can be appended side to side into one tabular dataset. In this case, only the column with the same name as in //Input// will be returned back to the calling module and renamed back to its original name. Other columns from the result table will be ignored and discarded.
 +
 +\\ 
 +=====Examples=====
 +**Mode:  Iterate, ignore results** — do not return anything from the iterated module, i.e. just run it one or several times. (top image, below)\\
 +{{  transformations:iterate-mode - columns.png  }}
 +**Mode:  Iterate, append result columns** — run the module one or several times, return a table (the result dataset) from each iteration, append all result columns into one, which becomes the output of the "Iterate column" action. (bottom image, above)\\
 +
 +\\ 
 +=====See also=====
 +  * [[transformations:input|Input]]
   * [[transformations:iterate|Iterate]]   * [[transformations:iterate|Iterate]]
   * [[transformations:iteratetable|Iterate table]]   * [[transformations:iteratetable|Iterate table]]
 +  * Read [[http://easymorph.com/learn/iterations.html|Iterations and loops in EasyMorph]] for more details regarding this action.
 +

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki