Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Extracting repeated fields and in insert into as a separate row in a table

  1. #1
    Join Date
    Oct 2009
    Posts
    13

    Default Extracting repeated fields and in insert into as a separate row in a table

    Hi,

    I have a input text file that includes repeated fields as below:
    field_primary_key, field_college1, field_college2, ..., field_college10
    What I am trying to accomplish is to add those repeated fields as separate rows in a table as below (the second column is a additional field to be used as a composite primary key of this table) :
    field_primary_key, 1, field_college1
    field_primary_key, 2, field_college2
    ...
    field_primary_key, 10, field_college10
    I wonder what steps can be used for this type of operation. I've tried the Modified JavaScript step, but it wasn't fitting since the output fields of the JavaScript step includes all the original input fields of the text file whereas I just want to extract those repeated fields one set at a time.

    Please help.
    Thanks in advance.

    Daniel

  2. #2
    Join Date
    Nov 2008
    Posts
    143

  3. #3
    Join Date
    Oct 2009
    Posts
    13

    Default

    Perfect! This is exactly what I was looking for. Thanks!

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.