A program to recognize and reward our most engaged community members
<?xml version="1.0" encoding="UTF-8" standalone="no"?><process version="5.3.015"> <context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process"> <process expanded="true"> <operator activated="true" class="execute_script" compatibility="5.3.015" expanded="true" height="76" name="Execute Script" width="90" x="246" y="30"> <parameter key="script" value="import com.rapidminer.tools.Ontology; import groovy.sql.Sql def foo = 'cheese' def sql = Sql.newInstance("jdbc:mysql://localhost:3306/mydb", "user", "pswd", "com.mysql.jdbc.Driver") // construct attribute set Attribute[] attributes= new Attribute[0]; attributes[0] = AttributeFactory.createAttribute("Name", Ontology.STRING); MemoryExampleTable table = new MemoryExampleTable(attributes); DataRowFactory ROW_FACTORY = new DataRowFactory(0); String[] strings= new String[0]; sql.eachRow("select * from FOOD where type=${foo}") { 		// construct example data 	 strings[0]=it.name.toString(); 	// make and add row 	DataRow row = ROW_FACTORY.create(strings, attributes); 	table.addDataRow(row);	 		} ExampleSet exampleSet = table.createExampleSet(); return exampleSet;"/> </operator> <connect from_op="Execute Script" from_port="output 1" to_port="result 1"/> <portSpacing port="source_input 1" spacing="0"/> <portSpacing port="sink_result 1" spacing="0"/> <portSpacing port="sink_result 2" spacing="0"/> </process> </operator></process>