"groovy script return type"
florinelul
New Altair Community Member
hi all
i've written a script that parses association rules and returns and example set. now i want to write this example set to my database, using the "Write database" operator (i'm using a mysql db).
however, when i'm trying to connect the output of my "Execute script" operator to the input of the "Write database" op, RM fails to recognize the output of my script as an example set, although this is the returned type. hence the operators are incompatible.
if i bind the output directly to "result", the script works fine and the exampleset is displayed properly.
is there a way to convert the output of a script to an example set? (specific operator / script methods etc.)
basicaly, this is what my script looks like:
(...)
MemoryExampleTable table = new MemoryExampleTable(attributes);
(...)
ExampleSet exampleSet = table.createExampleSet();
return exampleSet;
i know i can accomplish this by using the Java API, but I wanted to keep this inside RM so any help would be appreciated.
Florin.
i've written a script that parses association rules and returns and example set. now i want to write this example set to my database, using the "Write database" operator (i'm using a mysql db).
however, when i'm trying to connect the output of my "Execute script" operator to the input of the "Write database" op, RM fails to recognize the output of my script as an example set, although this is the returned type. hence the operators are incompatible.
if i bind the output directly to "result", the script works fine and the exampleset is displayed properly.
is there a way to convert the output of a script to an example set? (specific operator / script methods etc.)
basicaly, this is what my script looks like:
(...)
MemoryExampleTable table = new MemoryExampleTable(attributes);
(...)
ExampleSet exampleSet = table.createExampleSet();
return exampleSet;
i know i can accomplish this by using the Java API, but I wanted to keep this inside RM so any help would be appreciated.
Florin.
0
Answers
-
Hi Florin,
Actually, if you search back in this forum you'll see that I've been exactly down your path; because of the quite significant changes between 4.x and 5.0 I decided to buy the Extension white paper. In there we have, on the meta data ...
So there you have it, from the Master's voice!The only way of not loosing them when writing your own code is to build your own Extension to RapidMiner.
Toodles0 -
Hmmm, I will print this in bold letters and pin it on my wall.So there you have it, from the Master's voice!
But yes, this is still valid.
Greetings,
Sebastian0