1 # This migration demonstrates importing from a monolithic JSON file.
3 label: JSON feed of roles (positions)
8 # We use the JSON source plugin.
10 data_fetcher_plugin: http
11 data_parser_plugin: json
12 # The data_parser normally limits the fields passed on to the source plugin
13 # to fields configured to be used as part of the migration. To support more
14 # dynamic migrations, the JSON data parser supports including the original
15 # data for the current row. Simply include the 'include_raw_data' flag set
16 # to `true` to enable this. This option is disabled by default to minimize
17 # memory footprint for migrations that do not need this capability.
18 # include_raw_data: true
19 # Normally, this is one or more fully-qualified URLs or file paths. Because
20 # we can't hardcode your local URL, we provide a relative path here which
21 # hook_install() will rewrite to a full URL for the current site.
23 - /migrate_example_advanced_position?_format=json
24 # An xpath-like selector corresponding to the items to be imported.
25 item_selector: position
26 # Under 'fields', we list the data items to be imported. The first level keys
27 # are the source field names we want to populate (the names to be used as
28 # sources in the process configuration below). For each field we're importing,
29 # we provide a label (optional - this is for display in migration tools) and
30 # an xpath for retrieving that value. It's important to note that this xpath
31 # is relative to the elements retrieved by item_selector.
35 label: 'Unique position identifier'
39 label: 'Position name'
41 # Under 'ids', we identify source fields populated above which will uniquely
42 # identify each imported item. The 'type' makes sure the migration map table
43 # uses the proper schema type for stored the IDs.
48 # Note that the source field names here (machine_name and friendly_name) were
49 # defined by the 'fields' configuration for the source plugin above.
53 plugin: entity:user_role
54 migration_dependencies: {}
58 - migrate_example_advanced