Ruby Data Generator

Go to Product
Executes a jRuby script, returning 1 output DataTable. This node allows generating any data or do reading of data from external sources like files, RSS-feeds, HTTP and other Ruby-readable sources. A simple example script is included in the dialog's text window of the Script tab.

This node uses Ruby-wrapper. See knime.rb at ruby4knime

Also, you can include additional gems from an external jRuby installation. But before that do setup jRuby path in preferences.

Please specify Column list before using.

Options

Script output

Column list
Specify the column name and type of all result columns. After adding a new column, click on the name or type to change its value.

Script

$out_data_0
Output container housing the outgoing DataTable for output port 0. This must be populated with rows by the script or else there will be no output from the node.
Example use create DataTable with two columns:
  count = 10000
  count.times do |i|
    $out_data_0 << Cells.new.string('Hi!').int(rand i))
    setProgress "#{i*100/count}%" if i%100 != 0
  end

Input Ports

This node has no input ports

Output Ports

Icon
Table containing the results of the Ruby script.

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.