Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Data Migration into Drupal

1,141 views

Published on

Migrate module tour by Moshe Weitzman of Acquia. Presented at Drupalcon London 2011. See http://london2011.drupal.org/conference/sessions/data-migration-drupal

Published in: Technology
  • Be the first to comment

Data Migration into Drupal

  1. 1. Code and CodersData Migration into Drupal Moshe Weitzman @weitzman
  2. 2. Goals• Move data accurately and completely• End product is 100% native Drupal• Rapid, iterative, parallel development• Excellent dev <=> client communication
  3. 3. Migrate UI• Communicate development progress• Communication eases worry• Execute the migrations (or use drush)
  4. 4. Sources• mysql, postgres, mssql, oracle,• csv, xml, json• see /plugins for example code
  5. 5. Destinations• Entities: node_save(), user_save(), ...• Fields (text, number, list, address, link...• Contrib: OG, Flag, User Relationships, ...• DB Table• Easily create plugins for new ones
  6. 6. Field Mappings• $this->addFieldMapping(show, status) ->defaultValue(0)
  7. 7. Migration Class • The brains of a migration.
  8. 8. Hooks• prepareRow(), prepare()• complete()• See migrate_example/beer.inc, wine.inc
  9. 9. Single Record mapSource Mappings save message
  10. 10. Drush Commands• migrate-status• migrate-import, migrate-rollback• message and map tables• migrate-fields-destination
  11. 11. Advanced Features• Synch •Highwater tracking •System of Record• Stub entities• File handling (entity or File Field)• Timers, xhprof• migrate_example: oracle, baseball
  12. 12. Publish your Work• Share your classes •Wordpress Migrate •TYPO3_migrate •Custom classes
  13. 13. • Professional Services• Mike Ryan (author of Migrate module)• Moshe Weitzman
  14. 14. What did you think?
  15. 15. What did you think?Locate this session on theDrupalCon London website:http://london2011.drupal.org/conference/schedule
  16. 16. What did you think?Locate this session on theDrupalCon London website:http://london2011.drupal.org/conference/scheduleClick the “Take the survey”link
  17. 17. What did you think?Locate this session on theDrupalCon London website:http://london2011.drupal.org/conference/scheduleClick the “Take the survey”linkTHANK YOU!

×