Thursday, March 6, 2014

Gradle Spoon Console Plugin

As my blog followers know, I've been trying to get a Groovy Console into Pentaho Data Integration's (PDI's) Spoon UI for quite a while now.  I haven't put it into the Marketplace as we're wrestling with Groovy versions and I wanted to offer something that worked out-of-the-box versus something that needed extra setup/config.  For PDI 5.1 this should be a moot point...

...then I realized, I've been trying to bring the Groovy Console to PDI.  Why not bring PDI to the Groovy Console?  This idea was borne from a blog post by Mike Hugo with a tip of the hat to carlosgsouza who created a Gradle plugin from it.

The idea of the post (and thus mine) is that you can leverage Gradle to fetch your dependencies and keep track of your needed classpath, then start a Groovy Console with that classpath passed in. Thus you can access your project's dependencies (APIs, etc.) via the console, allowing for prototyping, rapid development, etc. of features.

For PDI, my GroovyConsoleSpoonPlugin project already had the necessary requirements: it had PDI/Kettle dependencies, it leveraged the Groovy Console, and it used Groovy to provide an internal Domain-Specific Language (DSL) for interacting with the PDI environment. After fixing a few bugs in my project related to working with the Groovy Console outside of Spoon, I'm happy to announce that the first version of the Gradle Console for PDI is ready to roll :)

To use, get Gradle and then just clone my GitHub project and run "gradle console" (or if you don't want/have Gradle, go to your clone and use "gradlew console"). You will be presented with a Groovy Console with PDI core dependencies, steps, etc. available, as well as my first attempt at an internal DSL for building transformations and jobs (see earlier blog posts). To change the PDI version, just edit the build.gradle file looking for the "project.ext.kettle_dependency_revision" property (yes, I know that's deprecated ;)

Here's an example of creating and running a (VERY!) basic transformation. I hope to implement a Builder soon to fill in metadata, etc. :


I'm hoping to make this DSL (and the whole experience) as easy yet powerful as possible, please let me know your ideas!

1 comment:

  1. betway » Casino and Games | Online Gambling in India
    Betway Casino. betway login As 메리트카지노 an independent Indian gambling site with a long list of games like blackjack, slots, poker and more, we aim to bring the fun and excitement of 퍼스트 카지노 Indian

    ReplyDelete