Pages: [1]
  Print  
Author Topic: How to make a repository store inside script?  (Read 361 times)
wessel
Hero Member
*****
Posts: 558


« on: November 08, 2013, 11:00:12 PM »

If I have a script with:

ExampleSet es = operator.getInput(ExampleSet.class);
Return es;


And then connect this script to a store operator.
I get this error:
Mandatory input missing at port Store.input.

The script runs fine, but this error probably caused because meta data not propagated trough script operator.
If I can just store inside the script, I don't need to use the store operator, and I get a nice process without warnings and errors.

Best regards,

Wessel
Logged
Marco Boeck
Administrator
Hero Member
*****
Posts: 905


WWW
« Reply #1 on: November 11, 2013, 09:03:39 AM »

Hi,

indeed, the script operator does not generate any meta data. To store an IOObject inside your script, you can just call
Code:
import com.rapidminer.example.ExampleSet;
import com.rapidminer.repository.RepositoryLocation;
import com.rapidminer.repository.RepositoryManager;

ExampleSet es = operator.getInput(ExampleSet.class);
String location = "//Local Repository/data/test";
RepositoryLocation repLoc = new RepositoryLocation(location );
RepositoryManager.getInstance(null).store(es, repLoc, null);
return es;

Regards,
Marco
« Last Edit: November 11, 2013, 09:20:22 AM by Marco Boeck » Logged

Pages: [1]
  Print  
 
Jump to: