Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Columns as rows

  1. #1
    Join Date
    Nov 2007
    Posts
    22

    Default Columns as rows

    Hi,

    Is there any transformation, script function or similar to change columns of a row into columns?

    I mean, if I have one row (for example: A1, A2, A3, A4) and I want to insert all the fields in a table I'll need to process the columns as rows, (in the example, I need to have four rows one per column).

    I have no experience with Kettle, and I don't know which will be the best way to change a row and convert it into new rows (using columns values as rows).

    My first idea is use an extra file where I'll write each row as rows (in the example the row A1, A2, A3, A4 will be
    A1
    A2
    A3
    A4
    And then process this extra file using another transformation.

    Thanks in advance for your help.

    Ana.

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

    Default

    Ana,

    Have a look at the "Normaliser" step and the example in samples/transformations.
    Perhaps you can use the "Flattener" step too, it depends on the use-case and whether or not you have a key to normalize with.

    HTH,
    Matt

  3. #3
    Join Date
    Nov 2007
    Posts
    22

    Default

    Thanks Matt, at the end I used the "Normaliser" step and I got the results

    Today is my first day using kettle and I have found a lot of help in the forum.

    Thanks,

    Regards,

    Ana.

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.