1 # This migration demonstrates importing from an endpoint listing other endpoints
2 # containing individual item data.
4 label: XML feed of varieties
9 # We use the XML source plugin.
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.
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
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.
37 label: 'Unique position identifier'
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.
48 default_value: migrate_example_wine_varieties
50 description: category_details
52 plugin: migration_lookup
54 source: category_parent
56 plugin: entity:taxonomy_term
57 migration_dependencies: