User Tools

Site Tools



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

Link to this comparison view

Both sides previous revision Previous revision
transformations:iteratecolumns [2021/07/08 17:37]
dmitry removed
— (current)
Line 1: Line 1:
-{{ 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 per iteration. 
-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. 
-=====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. 
-=====Action settings===== 
-|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]].\\ 
-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 name, regardless 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. 
-{{ :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. 
-**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:iteratetable|Iterate table]] 
-  * Read [[|Iterations and loops in EasyMorph]] for more details regarding this action.