Chris@0: INTRODUCTION Chris@0: ------------ Chris@0: The migrate_example_advanced module demonstrates some techniques for Drupal 8 Chris@0: migrations beyond the basics in migrate_example. It includes a group of Chris@0: migrations with a wine theme. Chris@0: Chris@0: SETUP Chris@0: ----- Chris@0: To demonstrate XML migrations as realistically as possible, the setup module Chris@0: provides the source data as REST services. So the migrations' references to these Chris@0: services can be set up accurately, if you install migrate_example_advanced via Chris@0: drush be sure to use the --uri parameter, e.g. Chris@0: Chris@0: drush en -y migrate_example_advanced --uri=http://d8.local:8083/ Chris@0: Chris@0: THE WINE SITE Chris@0: ------------- Chris@0: In this scenario, we have a wine aficionado site which stores data in SQL tables Chris@0: as well is pulling in additional data from XML services. Chris@0: Chris@0: To make the example as simple as to run as possible, the SQL data is placed in Chris@0: tables directly in your Drupal database - in most real-world scenarios, your Chris@0: source data will be in an external database. The migrate_example_advanced_setup Chris@0: submodule creates and populates these tables, as well as configuring your Drupal Chris@0: 8 site (creating node types, vocabularies, fields, etc.) to receive the data, Chris@0: and providing service endpoints for XML data. Chris@0: Chris@0: STRUCTURE Chris@0: --------- Chris@0: As with most custom migrations, there are two primary components to this Chris@0: example: Chris@0: Chris@0: 1. Migration configuration, in the config/install directory. These YAML files Chris@0: describe the migration process and provide the mappings from the source data Chris@0: to Drupal's destination entities. Chris@0: Chris@0: 2. Source plugins, in src/Plugin/migrate/source. These are referenced from the Chris@0: configuration files, and provide the source data to the migration processing Chris@0: pipeline, as well as manipulating that data where necessary to put it into Chris@0: a canonical form for migrations. Chris@0: Chris@0: UNDERSTANDING THE MIGRATIONS Chris@0: ---------------------------- Chris@0: Basic techniques demonstrated in the migrate_example module are not rehashed Chris@0: here - it is expected that if you are learning Drupal 8 migration, you will Chris@0: study and understand those examples first, and use migrate_example_advanced to Chris@0: learn about specific techniques beyond those basics. This example doesn't have Chris@0: the narrative form of migrate_example - it's more of a grab-bag demonstrating Chris@0: varous features, and is more of a reference for, say, copying the code to set Chris@0: up an XML migration. An index of things demonstrated by this module: Chris@0: Chris@0: Multiple vocabularies populated in one migration Chris@0: ------------------------------------------------ Chris@0: See migrate_plus.migration.wine_terms.yml. Chris@0: Chris@0: Importing from XML services Chris@0: --------------------------- Chris@0: See migrate_plus.migration.wine_role_xml.yml.