Module Development

Migration Map Tables for Drupal 8, 9, and 10

When a migration is run the Migrate API creates a mapping table that keeps track of what source record was used to create which destination record. A record is automatically added for each successfully migrated row. This mapping table can be used later to:

  • See if a row was previously imported
  • Look up the ID of the entity created for the row
  • Tracking if a source record has changed and needs to be re-imported.

In this tutorial we'll learn:

  • What migration map tables are
  • Why they exist, and what the Migrate API does with them

By the end of this tutorial you should be able to explain the use case for map tables and describe the data they contain.