Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Using user defined java class

  1. #1

    Default Using user defined java class

    I am using the user defined java class in a pentaho DI.
    I find it useful because you can use java code, but hard to ue.
    f you have to code s complex business logic, how do you test your code?, can you insert or reuse jar files??

    Thanks in advance

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by juanvg1972 View Post
    I find it useful because you can use java code, but hard to ue.
    Be careful with throwing java code at this step. It uses the janino compiler, so language features from Java 6 and up are not supported, not even all features from Java 5.

    Quote Originally Posted by juanvg1972 View Post
    f you have to code s complex business logic, how do you test your code?, can you insert or reuse jar files??
    Of course you can import from jar files. Look at the samples provided with Kettle in your installation folder or here in the forum.
    Regarding complex business logic: Don't do that in a UDJC step. You would create a maintenance nightmare that way.
    If you don't find a way to implement your ETL process using mostly Kettle standard steps, you don't understand Kettle yet or you picked the wrong tool.
    So long, and thanks for all the fish.

  3. #3

    Default

    Thanks Marabo

    Of course you can import from jar files. Look at the samples provided with Kettle in your installation folder or here in the forum.
    Regarding complex business logic: Don't do that in a UDJC step. You would create a maintenance nightmare that way.
    If you don't find a way to implement your ETL process using mostly Kettle standard steps, you don't understand Kettle yet or you picked the wrong tool.[/QUOTE]

    I am trying to do almost eveything using standard stes, but some steps(complex logic) is not easy to implement in standard steps..., I am looking for a wat, then I thought Java or Javascript may be a solution.....if not...what do you recommend??

    Thanks

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    It's worth to strive for the Kettle way - i like to call it visual dataflow programming. I know it's a bit harder to get there for those with a strong procedural mindset. Anyways, plan for a couple of weeks.
    As soon as you breathe the Kettle concepts you will know when to abandon ship - complex business logic isn't the thing I would use Kettle for. But then, you can always encapsule such logic in a custom plugin.
    Just don't turn to conventional coding too hastily using Java or JavaScript steps. You almost certainly will hate yourself for that as time goes by.
    So long, and thanks for all the fish.

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.