Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / migrate_plus / migrate_example_advanced / config / install / migrate_plus.migration.wine_variety_list.yml.txt
1 # This migration demonstrates importing from an endpoint listing other endpoints
2 # containing individual item data.
3 id: wine_variety_list
4 label: XML feed of varieties
5 migration_group: wine
6 migration_tags:
7   - advanced example
8 source:
9   # We use the XML source plugin.
10   plugin: xml
11   # Normally, this is one or more fully-qualified URLs or file paths. Because
12   # we can't hardcode your local URL, we provide a relative path here which
13   # hook_install() will rewrite to a full URL for the current site.
14   urls:
15     - /migrate_example_advanced_variety_list?_format=xml
16   item_url: /migrate_example_advanced_variety_list/:id?_format=xml
17   id_selector: /response/items
18   # Visit the URL above (relative to your site root) and look at it. You can see
19   # that <response> is the outer element, and each item we want to import is a
20   # <position> element. The item_xpath value is the xpath to use to query the
21   # desired elements.
22   item_selector: /response/variety
23   # Under 'fields', we list the data items to be imported. The first level keys
24   # are the source field names we want to populate (the names to be used as
25   # sources in the process configuration below). For each field we're importing,
26   # we provide a label (optional - this is for display in migration tools) and
27   # an xpath for retrieving that value. It's important to note that this xpath
28   # is relative to the elements retrieved by item_xpath.
29   fields:
30     category_name:
31       label:
32       selector: name
33     category_details:
34       label:
35       selector: details
36     category_parent:
37       label: 'Unique position identifier'
38       selector: parent
39   # Under 'ids', we identify source fields populated above which will uniquely
40   # identify each imported item. The 'type' makes sure the migration map table
41   # uses the proper schema type for stored the IDs.
42   ids:
43     category_name:
44       type: string
45 process:
46   vid:
47     plugin: default_value
48     default_value: migrate_example_wine_varieties
49   name: category_name
50   description: category_details
51   parent:
52     plugin: migration_lookup
53     migration: wine_terms
54     source: category_parent
55 destination:
56   plugin: entity:taxonomy_term
57 migration_dependencies:
58   require:
59     - wine_terms