Giter VIP home page Giter VIP logo

openmailbox / ruby-scripting-for-kettle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twineworks/ruby-for-pentaho-kettle

6.0 2.0 1.0 85.58 MB

Ruby Scripting for Kettle provides Ruby scripting capabilities to PDI a.k.a. Kettle by means of a Ruby scripting step.

Home Page: http://type-exit.org/adventures-with-open-source-bi/kettle-plugins/ruby-scripting-plugin/

License: Other

Shell 0.02% Ruby 89.91% C 0.04% Java 10.03%

ruby-scripting-for-kettle's Introduction

Ruby-Scripting-for-Kettle brings Ruby scripting to the PDI ETL tool which is also known as Kettle.

This project provides a scripting step similar to the JavaScript and User Defined Java Class steps. It aims to make the elegance of the Ruby language available to Kettle users. The implementation is based on jruby, which also enables easy Java scripting in Kettle.

How to get it?

Download any tagged version using the downlaod button or check out the source and compile it yourself.

How to install?

If you download a tagged version, the archive file will contain a "Ruby" folder. Copy it to /plugins/steps and restart Spoon. The "Ruby Scripting" step will appear in the "Scripting" section of a transformation.

If you compile from source you'll have to edit build.properties and make the kettle-dir property point to a Kettle 4.x folder. This folder will be used to resolve compile time dependencies and for installation. Invoke the install ant target to compile and install the plugin by typing

ant install

How do I write ruby scripts in Kettle?

The Ruby scripting step comes with a lot of samples. Access them by opening a Ruby step dialog and exploring the samples section on the left.

Samples

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

Where do I report bugs and issues?

Please use the github issue tracker.

Can I use Ruby Gems?

Absolutely, as long as jruby likes the gem (i.e. it has no unsupported native bindings) you may use gems as with any other ruby program. There scripting step comes with samples demonstrating the use and installation of Ruby Gems.

How do I compile the project?

Before you can use the ant build script you need to edit build.properties and make the kettle-dir property point to a Kettle 4.x installation folder. After that it's simple ant invocations.

To compile:

ant compile

To run the test suite:

ant test

To create a distribution package:

ant package

To install into the Kettle folder:

ant install

Can I setup the project in Eclipse?

Sure, just import the project into Eclipse after checking out. You need to adjust the build path to refer to the Kettle jars of your Kettle 4.x installation.

How can I contribute?

If you'd like to contribute please fork the project, add the feature or bugfix and send a pull request, so I can include your contribution and mention you in the credits.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.