Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Performing logic on a set/collection of rows

  1. #1
    Join Date
    Mar 2011
    Posts
    140

    Lightbulb Performing logic on a set/collection of rows

    Hello,

    Is there a way I can perform logic on a set of rows instead of one row at a time ?

    What I mean is, like fetching five rows from the stream do some checks (is it a collection, like do they belong together) then do something. Then you fetch the next five rows and so on ..

    Pre-checking the next x rows would also solve this problem.

    I hope you can follow me. If you can't, let me know and I'll try to explain it better.


    Cheers .. !
    Last edited by ObjectiveC; 11-08-2011 at 07:49 PM.

  2. #2
    Join Date
    Sep 2009
    Posts
    810

    Default

    Hi Objective C,

    depending on the logic required, you may want to either use the "Analytic Query" step, do some JS based scripting, or if you're into Ruby, check the Ruby step.

    https://github.com/type-exit/Ruby-Sc...ttle/downloads

    I think there is a sample for processing n rows at a time with that.

    Cheers
    Slawo

  3. #3
    Join Date
    Mar 2011
    Posts
    140

    Default

    Hi Slawo,

    Thanks, I'll look into that.

    In this particular case I would even like to get all the rows, process them as a collection and then send them out one at a time (or as a collection).

    Hope the ruby-scripting step can achieve something like this.


    Cheers.. !

  4. #4
    Join Date
    Sep 2009
    Posts
    810

    Default

    Quote Originally Posted by ObjectiveC View Post
    In this particular case I would even like to get all the rows process them as a collection and then send them out one at a time (or as a collection).

    Hope the ruby-scripting step can achieve something like this.
    I think there's a sample for that too

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.