Upgrade to Pro — share decks privately, control downloads, hide ads and more …

67-311 Data import presentation

Adam Weis
November 28, 2012

67-311 Data import presentation

How to import data after a database transition. Case Study: Schedule+

Adam Weis

November 28, 2012
Tweet

More Decks by Adam Weis

Other Decks in Education

Transcript

  1. What changed? A lot. Instructors are now a table, not

    a row in Courses Wednesday, November 28, 12
  2. What changed? A lot. Instructors are now a table, not

    a row in Courses Completely new relationships with “Group” join table Wednesday, November 28, 12
  3. What changed? A lot. Instructors are now a table, not

    a row in Courses Completely new relationships with “Group” join table etc. Wednesday, November 28, 12
  4. Solution Write a database importer script! Query both databases simultaneously

    to import legacy data into new schema! Wednesday, November 28, 12
  5. Database importer ingredients Establish a new ActiveRecord connection with old

    database Recreate all legacy model relationships Wednesday, November 28, 12
  6. Database importer ingredients Establish a new ActiveRecord connection with old

    database Recreate all legacy model relationships Create the to_model methods Wednesday, November 28, 12
  7. Database importer ingredients Establish a new ActiveRecord connection with old

    database Recreate all legacy model relationships Create the to_model methods Write the driver Wednesday, November 28, 12
  8. Citations Vincent Siao (SCS & HCI 2014) Jason MacDonald (SCS

    2013) Steven Fackler (SCS 2013) Wednesday, November 28, 12
  9. Citations Vincent Siao (SCS & HCI 2014) Jason MacDonald (SCS

    2013) Steven Fackler (SCS 2013) Tim Riley: http://openmonkey.com/blog/2009/05/02/ importing-legacy-data-in-rails/ Wednesday, November 28, 12
  10. Citations Vincent Siao (SCS & HCI 2014) Jason MacDonald (SCS

    2013) Steven Fackler (SCS 2013) Tim Riley: http://openmonkey.com/blog/2009/05/02/ importing-legacy-data-in-rails/ https://github.com/aweis/rails_importer/blob/master/ S13importer.rb Wednesday, November 28, 12