Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: Using Pentaho API for constructing and running transformations and jobs

  1. #1

    Default Using Pentaho API for constructing and running transformations and jobs

    Hello,

    I've just got the hang of using Pentaho API for creating and running transformations. This is far more flexible than to fiddle with GUI XML Editors, such as Spoon. What I couldn't find, however, is how can I add a TransMeta object to my JobMeta object. It seems that it is absolutely mandatory to keep my transformation either in XML file or in Repository, otherwise I cannot add it to the Job object. Are there any Pentaho Developers in this forum? Do I have to serialize my TransMeta object to XML file, and then specify a filename to be read from, instead of just passing the reference?

    Hello??

  2. #2

    Default

    Chill out, there are plenty of Kettle Devs in this forum, they just generally use Sunday as a day of rest.
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

  3. #3

    Default

    I apologise if I sounded rather impatient, it is just I was confused not to be able to see what I expected to see.
    I still hope I am missing something here, so far all conclusions are based on class org.pentaho.di.job.entries.trans.JobEntryTrans that doesn't allow to pass TransMeta object as a reference in order to add a Transformation to the Job.

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Jobs and transformations are intentionally loosely bound. Jobs and transformations need to be persisted before they can be executed by a job.

  5. #5

    Default

    Thanks for your reply, Matt. Even though there must be some reasons behind such decision, to me (as an API user) this looks like extra work.
    As you know we can create and run tranformations without using Repository. What I'm trying to accomplish is to run two Transformations sequentially using API. And everyting gets excessively complicated, as I need to use Repository, then I need to save my Transformation in it, need to make sure it's not mistakenly overwritten between saving and loading by the job object, etc... If I already *can* create and run Transformation without Repository it feels unnatural not to be able to do the same with jobs.

  6. #6
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Well, Kettle wasn't written to serve your needs exclusively.

    If you want to run completely in-memory, you can always create a new Job Plugin that does what you want.
    Nobody is forcing you to use a repository either. Create a temp file, throw the XML of the transformation in there and clean up afterwards. That should not be that hard to do either.

    Matt

  7. #7

    Default

    Thanks, Matt. I am aware of the possibility that you mentioned, which, however, sounds like a workarond in my case (especially if we talk about ejb, creating a temp file from MDB and clean it up afterwards, this doesn't seem like a good design to me).

    To be honest, I don't see a reason of intentionlly disabling the ability of adding transformations object to job objects.

  8. #8

    Default

    Quote Originally Posted by MattCasters View Post
    Well, Kettle wasn't written to serve your needs exclusively.
    Matt

    To create a job with some transformations in it, isn't it one of the most common usage scenarios?

  9. #9
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    To create a job with some transformations in it, isn't it one of the most common usage scenarios?
    Indeed it is not. The main intent is to execute pre-defined transformations.
    The amount of re-use with transformations exclusively tied to a single job is exactly zero and such this will be something that will never end up in Kettle.

    Matt

  10. #10

    Default

    Quote Originally Posted by MattCasters View Post
    Indeed it is not. The main intent is to execute pre-defined transformations.
    The amount of re-use with transformations exclusively tied to a single job is exactly zero and such this will be something that will never end up in Kettle.
    I am not saying it should be exclusive. Java references are by default shared, so I could add the same transformation object to several job objects as a Java reference. Anyway I get your point, it is crearer now for me why you did it this way. Thanks for all the explanations.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.