Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Strategies for Resolving Migrate Failures

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:03
    for Resolving Migrate Failures with Joe Shindelar
  • 0:08
    JOE SHINDELAR: In the real world, when we're importing data,
  • 0:10
    it's pretty rare that the source data we're importing
  • 0:13
    is completely clean, and we'll be able to run
  • 0:16
    a migration without encountering any errors.
  • 0:18
    A more realistic scenario is needing to run our migration,
  • 0:22
    find the errors, track down what's causing them,
  • 0:24
    and solve it, and then revert the migration and re-run it.
  • 0:28
    What I'd like to do in this lesson is take a look at some strategies
  • 0:31
    for locating problems in our migration

Strategies for Resolving Migrate Failures

Loading...

It's almost unheard of to write a data import that just works on the first try. Our examples have all been written using data that is known to be in good shape, and to be honest we've avoided even trying to import some of the data because it ended up being problematic and we wanted to focus on working with the Migrate module and not debugging the problems in your source data. In the real world though, you're going to end up with problematic rows in your source data and you'll need to get them resolved.

In this lesson we'll run the complete player migration and end up with a couple of rows that fail to import because of an oversight in our code. We can use the migrate UI to get a sense of what is failing and why. Then we'll use a combination of options available to the drush migrate command and some strategically placed print_r's to debug and resolve the problem rows. Finally, we'll use a trick to get the Migrate module to re-import all the problem rows but not the already imported rows.

Downloads: 
Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.