🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

"groovy script return type"

User: "florinelul"
New Altair Community Member
Updated by Jocelyn
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.

Find more posts tagged with