Migrate API is in charge of storing in this table the source ID, the destination ID and a hash related to the ‘row’ in this data mapping table. This table contains the information related to the movements of a row of data (migrations are operated ‘row’ to ‘row’). Two more tables have been generated:īut also, later, after executing the migration with ID taxonomy_google_sheet_wrong contained in our custom module, we see in the database that two new tables have been generated related to the executed migration: If you’re in a basic Drupal installation (standard profile) we have seventy-three tables, after the activation of the basic modules related to migrations: migrate, migrate_plus, migrate_tools and in this case the custom migration_google_sheet_wrong the number of tables in the database is seventy-five. You can rely on a YAML syntax review service such as but you will have to monitor the result as well. As a measure, as in the previous case, we will review all the cases of indentations registered in the file. It is very frequent that some indentation is not the right one and this ends up producing an error in the processing of the file. Whitespaces: Any extra whitespace may be causing us problems at the level of the migration description file: we review all lines of the file in a quick scan in order to detect extra whitespace.Įrrors in the indentation: The migration description file has a format based on YAML, a language for data serialization based on a key scheme: a value where it is structured by parent - child levels and an indentation of two spaces to the right at each level down in the hierarchy. So before anything else, we’ll do a quick review of: The first steps in our process of debugging a migration will be a review of two fundamental issues that usually appear in many migrations. 2.1- Reviewing your Migration description fileįirst of all we are going to comment on the most intuitive step of all we will take, since sometimes there are errors that occur at first sight and not because they are recurrent but end up being more obvious. In other words: we will go step by step and expand our migrated data. To begin with, it is essential to keep the focus on reducing the range of error possibilities as much as possible by approaching the migration in an iterative and incremental manner. 2- Basic Debugging (Keep an eye on your files)įirst, we will start with a very primary approach to error detection during a migration. All the examples in this post were taken of the migration_google_sheet example, from my Gitlab account. I was thinking about writing a sub-series of debugging migrations (inside the main series about Drupal Migrations), and I want to publish now the first part, just a set of basic steps in order to get all the available information from a migration process. In the wake of the latest articles, I wanted to continue expanding information about migration in Drupal. Average Debugging with Migrate Devel Module.ĥ- Drupal Migrations (V): Debugging Migrations-II.Basic Debugging of a Drupal Migration: files, database tables and configuration objects.Special Properties from the JSON transformation.Ĥ- Drupal Migrations (IV): Debugging Migrations First Part.Exposing Data Through Google Spreadsheet.Arrangements: Migrating embedded data and CSV file.ģ- Drupal Migrations (III): Migrating from Google Spreadsheet.Introduction: Migration as code or as configuration.Contributed Modules for Plugins in Migrations.Contributed Modules for Migrations in Drupal.This article is part of a series of posts about Drupal Migrations:ġ- Drupal Migrations (I): Basic Resources Picture from Unsplash, user Krzysztof Niewolny, of ContentsĢ- Basic Debugging: Keep an eye on your file If we add the irrefutable fact that a migration will tend to generate errors in many cases until it has been refined, it’s clear then that one of our first needs will be to learn…how to debug migrations. The reason is very intuitive: although the Migrate API is a supersystem that offers a very simple “interface” of interactions for the user-developer who wants to build migration processes, in reality several subsystems work by interacting with each other throughout a migration process: Entities, Database, Plugins…There are a lot of classes involved in even the simplest migration process. The Drupal migrations, despite their linearity in terms of definitions, contain a lot of inherited complexity.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |