Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Create temp primary key within transformation

  1. #1
    Join Date
    May 2009
    Posts
    21

    Default Create temp primary key within transformation

    Hi All,

    I'm trying to establish how split a column of values into two new fields according to the value in another field. A source example stream is shown below:

    Data_Type Date Region Values
    Price 12/03 Region1 10
    Price 12/03 Region2 11
    Price 12/03 Region3 13
    Price 12/03 Region4 20
    Demand 12/03 Region1 2000
    Demand 12/03 Region2 1245
    Demand 12/03 Region3 5236
    Demand 12/03 Region4 1234

    I need the data to be formatted as follows:

    Date Region Price Demand
    12/03 Region1 10 2000
    12/03 Region2 11 1245
    12/03 Region3 13 5236
    12/03 Region4 20 1234

    So I basically need to make region a primary key within the transformation. What step could I use in Kettle to perform this type of pivot and how would i go about it?

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

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.