Welcome to the home of the Ruby Scripting plugin for Kettle a.k.a PDI
The Ruby Scripting plugin brings the power and elegance of the Ruby language to your ETL. It comes with dozens of samples demonstrating the plugin’s capabilities. So even if you’re not fluent in Ruby, it might serve as a gentle introduction. It is available for PDI 4.x under the LGPL 2.1 License. Enjoy!
Features at a glance
- rows are represented as a hashes, indexed by field name
- automatic conversion between all Kettle data types and native Ruby types
- scripts have access to rows from info steps
- scripts can send rows selectively to target steps
- scripts may redirect rows to an error stream by using Kettles error handling feature
- a script tab may be declared a start script, which executes only once before the first row arrives, useful for init tasks
- a script tab may be declared an end script, which executes only after all incoming rows have been processed, useful for cleanup and summary tasks
- a script tab may be declared a lib script, which can be imported by any other script tab when required
- steps with no input can be used as row generators
- Kettle step ($step) and transformation ($trans) objects are available in ruby scope for advanced scripting
- you may call your favorite java libraries from the ruby script
- you may use ruby gems in Kettle transformations
Grab a copy of the step at github
It’s probably best to grab a tagged package (they are available by the “Downloads” button) unless you want to compile from source.
If you download a tagged version, the archive file will contain a “Ruby” folder. Copy it to kettle-dir/plugins/steps and restart Spoon. The “Ruby Scripting” step will appear in the “Scripting” section of a transformation.
Enjoy the samples and have fun!