"RapidMiner process integrated in Java - how to execute macros."

onesix4onesix4 Member Posts: 7 Contributor II
edited June 2019 in Help
Based on the following post:
http://rapid-i.com/rapidforum/index.php/topic,7785.msg26715.html#msg26715

I was able to build a java application that executes the a RapidMiner process. 
  Process process = new Process(new File("C:\\Users\\Goutham\\.RapidMiner5\\repositories\\Local Repository\\TTT_REFACTORING/HTTP_ct5_categories.rmp "));
          process.run();
          */

I would like to pass macro to this process in java.  Has anybody had success in doing this in java..
I know you can execute this at command line: 
/scripts/rapidminer -f ../TTT_REFACTORING/HTTP_ct5_categories.rmp "-MdateT=2010-11-11" "-Mtmzone=PST" "-MOutFile=/tmp/HTTP_ct5_cat_result.csv"

Thanks.

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    you can use the following before running your process:

    for (Map.Entry<String, String> macro : macroMap.entrySet()) {
    process.getContext().addMacro(new Pair<String, String>(macro.getKey(), macro.getValue()));
    }
    Regards,
    Marco
Sign In or Register to comment.