Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Inserting multiple rows with different field values

  1. #1
    Join Date
    Jul 2007

    Question Inserting multiple rows with different field values


    I have a field in my transformation (f1) from which I want to create 4 separate rows in a database table.

    Each of the rows contains the field (f1) but the value is incremented by 1 for each of the 4 rows. Note order is not important although would be preferred.
    Output should look like

    row 1 => f1=34
    row 2 => f1=35
    row 3 => f1=36
    row 4 => f1=37

    Any pointers to the best way to achieve this, would be appreciated as I've tried a few things without success.



  2. #2
    Join Date
    May 2006


    Have it generated by the database?


  3. #3
    Join Date
    Jul 2007

    Thumbs up

    That's what I was planning to do - I just wondered if I should be using any of the constructs available within the transformation steps to accomplish the same task.

    From your answer it doesn't appear there is - so thanks for that.

    I'm just trying to discover how much of the proces I can do directly using the transformation steps and how much I leave to external entities like a database.

    Thanks again for your help


  4. #4
    Join Date
    May 2007


    one way to do this is to use 'Generate Rows' to create the desired number of rows and feed these rows into , for example' 'Get Sequence value from database' and just use a transformation counter.

    Of course you could feed them into a javascript step to do a more complicated calculation.

    I combine multiple instances of this pattern with the cartesian product step to generate all combinations of key values for a multi-dimension key

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.