Drupal 8 migration: taxonomy term lookups

By resorting to YAML files for configuration, Drupal 8 achieved a huge boost in flexibility and understandability of the parameters. Even more it is useful for such a “commonly uncommon” task as migration.

Indeed, in D7 you had a set of forms to match source to destination, using some limited set of processing options. Now, in D8, these three stages of migration are totally separated out, unleashing a (nearly) unlimited power of building processing pipes and referencing other migrations.

However, there are tasks, which are, intuitively, often requested, but cannot be achieved in the pre-defined set of plugins. In the upcoming series of posts I am going to present my solutions to some of these tasks. Today I start with one of the most common: taxonomy term lookups.

Here is the process plugin, that does the “text to taxonomy term” conversion:

It can be used as follows:

Or like this:

 

There is one drawback – the created terms are not tracked for migration reversion. Please keep that in mind when using.

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting this form, you accept the Mollom privacy policy.