ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Migrate Module
Presented by danylevskyi (Dmytro Danylevskyi)
DrupalCamp Kyiv 2013
Migrate is Framework
Flexible framework for migrating content into
Drupal from other sources.
The Goal
Convince you to use Migrate module if you need:
¡ñ
Migrate data to Drupal
¡ñ
Update big amount of Drupal data
¡ñ
Periodically update Drupal data from external
sources
Sources & Destinations
¡ñ
CSV ¡ú
¡ñ
XML ¡ú
¡ñ
JSON ¡ú
¡ñ
PDO (DBTNG) ¡ú
¡ñ
MSSQL ¡ú
¡ñ
Oracle API ¡ú
¡ñ
??? ¡ú
¡ñ
Node
¡ñ
User
¡ñ
Taxonomy term
¡ñ
Comment
¡ñ
File
¡ñ
Fields
¡ñ
Other Entities
Usage Cases
¡ñ
Migrate data to Drupal from single source
¡ñ
Compile and migrate data from multiple sources
to Drupal
¡ñ
Incremental & repeatable migrations
¡ñ
Updating existing content
¡ñ
Creating test content
Useful Tools: Web UI
¡ñ
Supporting collaboration between stakeholders
and implementors
¡ñ
Quality assurance
¡ñ
Performance statistics
Useful Tools:
Drush Integration
¡ñ
$ migrate-import Article
¡ñ
$ migrate-import Article ¨Cupdate
¡ñ
$ migrate-import Article --limit="100 items"
¡ñ
$ migrate-import Article --group="MyGroup"
Inside Migrate:
Architecture
Object-oriented architecture allows default
behavior to be extended and/or overridden.
¡ñ
Migration
¡ñ
MigrateSource
¡ñ
MigrateDestination
¡ñ
MigrateMap
¡ñ
MigrateFieldMapping
Inside Migrate:
Migration Classes
¡ñ
Define where the source data is coming from.
¡ñ
Define the destination object type.
¡ñ
Define mappings from source fields to
destination fields.
Inside Migrate: Commonly
Implemented Methods
¡ñ
function prepareRow($row)
¡ñ
function prepare($entity, stdClass $row)
¡ñ
function complete($entity, stdClass $row)
¡ñ
function createStub()
https://drupal.org/project/migrate
Thank You!

More Related Content

Migration