1 # This migration demonstrates importing from an endpoint listing other endpoints
2 # containing individual item data.
4 label: XML feed of varieties
7 # We use the XML source plugin.
9 # Normally, this is one or more fully-qualified URLs or file paths. Because
10 # we can't hardcode your local URL, we provide a relative path here which
11 # hook_install() will rewrite to a full URL for the current site.
12 urls: /migrate_example_advanced_variety_list?_format=xml
13 item_url: /migrate_example_advanced_variety_list/:id?_format=xml
14 id_selector: /response/items
15 # Visit the URL above (relative to your site root) and look at it. You can see
16 # that <response> is the outer element, and each item we want to import is a
17 # <position> element. The item_xpath value is the xpath to use to query the
19 item_selector: /response/variety
20 # Under 'fields', we list the data items to be imported. The first level keys
21 # are the source field names we want to populate (the names to be used as
22 # sources in the process configuration below). For each field we're importing,
23 # we provide a label (optional - this is for display in migration tools) and
24 # an xpath for retrieving that value. It's important to note that this xpath
25 # is relative to the elements retrieved by item_xpath.
34 label: 'Unique position identifier'
36 # Under 'ids', we identify source fields populated above which will uniquely
37 # identify each imported item. The 'type' makes sure the migration map table
38 # uses the proper schema type for stored the IDs.
45 default_value: migrate_example_wine_varieties
47 description: category_details
51 source: category_parent
53 plugin: entity:taxonomy_term
54 migration_dependencies: