Release Day: Writing a Custom Migration

This week we're finally ready to dive in and write our first custom migration with the Migrate module. To get things set up, we need to get our source data, and create the content type in our Drupal site so that we have a destination. Joe walks through grabbing some baseball stats in SQL format for the source, and then building out the content types we'll need for teams and players. With source and destination in place, you'll create your migration module, and get it set up with the basic info you need, including making sure Drupal can talk to our source database, which is a separate database from our Drupal site. In the final lesson for this week, we get a simple migration mapped in our code, and actually run the migration for the first time.

Next week we keep rolling along with the migration by completing our various field mappings, including manipulating some of our source data to better fit our destination.

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code class> <ul type> <ol start type> <li> <dl> <dt> <dd><h3 id> <p>
  • Lines and paragraphs break automatically.

About us

Drupalize.Me is the best resource for learning Drupal online. We have an extensive library covering multiple versions of Drupal and we are the most accurate and up-to-date Drupal resource. Learn more