User Tools

Site Tools


iterations

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
iterations [2015/05/01 09:08] dmitryiterations [2016/06/07 23:04] dmitry
Line 1: Line 1:
 ===== Iterations ===== ===== Iterations =====
  
-Currently iterations are not natively supported in EasyMorph, although they are possible with a simple workaround.+Iterations in EasyMorph are done by iterating through columns values and passing these values to another EasyMorph project as parameters.
  
-  * Setup EasyMorph project so that it takes, say, **input.csv** and produces **output.csv** +Please read [[http://easymorph.com/learn/iterations.html|Tutorial: Iterations and loops]] for more details.
-  * Generate a list of files to process in EasyMorph +
-  * Iterate through this list: +
-    * Take one file from the list and copy it as **input.csv** +
-    * Run the EasyMorph project +
-    * Rename **output.csv** and copy it to a designated output directory +
- +
-Below is an example of a batch file that does exactly this: +
- +
-  @echo off +
-  setlocal EnableDelayedExpansion +
-  SET pathEasyMorph=C:\Users\Dmitry\AppData\Local\EasyMorph\Morph.exe +
-  SET pathInputFolder=.\ +
-  SET pathOutputFolder=.\ +
-   +
-  for /f "tokens=*" %%a in ('dir /b "%pathInputFolder%*.csv" ') do ( +
-    copy /Y "%%a" input.csv +
-    %pathEasyMorph% /c /run "my project.morph" +
-    copy /Y output.csv "%pathOutputFolder%Processed - %%~na.csv" +
-    echo Processed: %%a +
-  ) +
- +
-=== See also === +
- +
-  * [[http://easymorph.com/examples.html#qlikview|Example of iterations in EasyMorph using QlikView loading script]]. +

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki