migrate_plus.migration.wine_terms.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. id: wine_terms
  2. label: Migrate all categories into Drupal taxonomy terms
  3. migration_group: wine
  4. source:
  5. plugin: wine_term
  6. destination:
  7. plugin: entity:taxonomy_term
  8. process:
  9. name: name
  10. description: details
  11. # Usually, one wants to have a separate migration for each entity_type/bundle
  12. # combination - e.g., separate migrations for articles and blog posts, as
  13. # opposed to a single monolithic node migration. This affords maximum
  14. # control - the ability to import just one bundle at a time, and most
  15. # importantly to have distinct field mappings (because different node types
  16. # usually have different fields). In this case, though, because all of the
  17. # vocabularies we're importing come from a common table, and on the Drupal
  18. # side there are no distinct custom fields, we are able to import them all in
  19. # one migration. The static_map tells the migration in which vocabulary to
  20. # place each term, based on the incoming 'type' column.
  21. vid:
  22. plugin: static_map
  23. source: type
  24. map:
  25. best_with: migrate_example_wine_best_with
  26. region: migrate_example_wine_regions
  27. variety: migrate_example_wine_varieties
  28. parent:
  29. plugin: migration
  30. migration: wine_terms
  31. source: category_parent
  32. weight: ordering
  33. migration_dependencies: {}
  34. dependencies:
  35. enforced:
  36. module:
  37. - migrate_example_advanced