# Recap
Thank you for everyone again who attended our second migration webinar. For those of you who missed it, here is the YouTube video of the webinar:
The slidedeck is available for all those who want to go through it. The GitHub repo's branch has been updated for this webinar with all the examples I showed you during this webinar.
Here is a quick recap going over all the topics I did for the webinar. It is best to watch the video as it goes more in depth and has live explanations and examples.
# Source Plugins
In this portion of the webinar, I went over Drupal 8/9 Source Plugins and their role in the migration ecosystem. Some of the topics I covered were:
- Various types of Source plugins that I use regularly. Also how to find them by searching the code base via:
id = "plugin_name
. - Went over prepareRow / hook_migrate_prepare_row and their importance on massaging data for process plugins.
- I also talked about getting and setting the source data via these methods.
- I went over extending and replacing Source plugins such as:
- Removing setting the language at the source.
- Using multiple node types in a source. I also included an example YAML for the multiple types example as well.
- Running the Node migrations in descending order.
- Finally, I went over writing your own Source plugin for a table to table migration.
- I wrote a good blog post previously on doing a typical entity migration that doesn't have a migration path yet. I didn't go over this during the webinar.
# Destination Plugins
I skipped ahead next and went over destination plugins as there wasn't too much to go over here. The likelihood that you will tweak or extend these plugins is almost non existent. I did go over:
- Using
drupal de
to find what content entities to migrate to. - Using the table destination plugin provided by Migrate Plus.
I had previously written a blog post on the table to table migration. Check it out as it is a good reference.
# Process Plugins
This is where I spent a good chunk of the webinar talking. I went over a variety of process plugins that I use typically. While this isn't every single process plugin I use during migration. It does however encompass about 99% of the use cases I have encountered. The plugins I went over were:
- get
- Probably the most common plugin used, literally just gets the value from your field. Can be substituted with just the destination field name as well.
- sub_process
- Allows for the processing of arrays through another process plugin’s workflow. Commonly used to process data in reference fields, dates, body fields, etc.
- static_map
- Maps one value on the D7 side to what you want it on the D8 side. Commonly used with WYSIWYG formats and transforming select field options
- format_date
- Does what you think it does.
- migration_lookup
- Used when you need to map one entity migration to another via an id. Commonly used in paragraph / reference migrations
- skip_on_empty
- Skips processing that entity row of the field is empty. I have used those for various reasons, usually bad data like a broken title or missing file id
- default_value
- Apply a default value when the field is empty or NULL.
- extract
- Used to extract entity ids typically in single reference based fields or used in a chain not in sub_process
I then went over commonly requested data transformations:
- Migrating fields to a single paragraph
- Here is the paragraph yaml and the field it maps to via migration_lookup.
- Migrating files to media
- File Source Plugin to filter by mime-type.
- The file (image) to media yaml.
- Finally the field mapping.
- Migrating multiple paragraphs
# Wrap Up
Thank you again for attending this webinar. For easy reference, here are all the blog posts I have written on migrations:
- Migrating a Drupal 7 Body Field to a Drupal 8 Paragraph
- Migrating to a Drupal 8 Date Range
- Migrating Drupal 7 Organic Groups to Drupal 8 Group
- Handling Post Migration Events in Drupal 8
- Changing a Content Type Name During a Drupal 8 Migration
- Writing a Custom Drupal 8 Module Upgrade Path
- Writing a Drupal 8 Table to Table Migration Path
- Migrating a Drupal 7 File To a Drupal 8 Media Entity
- Migrating a Drupal 7 AddressField To a Drupal 8 Address
- Migrating a Drupal 8 Multisite to a Standalone Drupal 8 Site
Our next webinar will be held on May 29, 2020; more details to follow on what we will be presenting on.
In the interim, if your organization has any questions with a migration you are performing, please fill out the form below so we can chat more.