1 # This migration demonstrates importing from a monolithic JSON file.
3 label: JSON feed of roles (positions)
6 # We use the JSON source plugin.
8 data_fetcher_plugin: http
9 data_parser_plugin: json
10 # The data_parser normally limits the fields passed on to the source plugin
11 # to fields configured to be used as part of the migration. To support more
12 # dynamic migrations, the JSON data parser supports including the original
13 # data for the current row. Simply include the 'include_raw_data' flag set
14 # to `true` to enable this. This option is disabled by default to minimize
15 # memory footprint for migrations that do not need this capability.
16 # include_raw_data: true
17 # Normally, this is one or more fully-qualified URLs or file paths. Because
18 # we can't hardcode your local URL, we provide a relative path here which
19 # hook_install() will rewrite to a full URL for the current site.
20 urls: /migrate_example_advanced_position?_format=json
21 # An xpath-like selector corresponding to the items to be imported.
22 item_selector: position
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_selector.
32 label: 'Unique position identifier'
36 label: 'Position name'
38 # Under 'ids', we identify source fields populated above which will uniquely
39 # identify each imported item. The 'type' makes sure the migration map table
40 # uses the proper schema type for stored the IDs.
45 # Note that the source field names here (machine_name and friendly_name) were
46 # defined by the 'fields' configuration for the source plugin above.
50 plugin: entity:user_role
51 migration_dependencies: {}
55 - migrate_example_advanced