Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: One to many and Many to many

  1. #1
    Join Date
    Aug 2007

    Default One to many and Many to many

    Instead of populating a warehouse, I'm using Kettle to migrate data from an old version of a database schema, to a new, updated version of the schema.

    My question is, say I have people and orders. I want to insert people into the new schema, then insert all of their orders. The primary key for the person will be different from the old database, so I can't just jam the orders in there using the old key.

    Any ideas on how to accomplish this?

  2. #2
    Join Date
    May 2006


    A conversion table, assuming you're talking about using surrogate id/integers as keys.

    Make a table with your business key, the old integer key, and place for a new one. Jam in the orders in the new database so that the new "surrogate id" is created. Scan over the conversion table and lookup/save the new surrogate ids in the conversion table. Then in whatever data you move which contains the old key, lookup the new key and save to the new database.


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.