wxt-8.x-3.011/modules/custom/wxt_ext/wxt_ext_migration/config/install/migrate_plus.migration.gcweb_ext_group.yml
modules/custom/wxt_ext/wxt_ext_migration/config/install/migrate_plus.migration.gcweb_ext_group.yml
id: gcweb_ext_group
migration_group: gcweb
migration_tags:
- Group
dependencies:
enforced:
module:
- wxt_ext_migration
label: 'Json data for Groups'
source:
# We use the JSON source plugin.
plugin: url
data_fetcher_plugin: http
data_parser_plugin: json
headers:
Accept: application/json
urls: 'http://open.canada.ca/data/api/action/organization_list?all_fields=true'
item_selector: result
fields:
-
name: machine_name
label: 'Machine Name'
selector: id
-
name: shortcode
label: Shortcode
selector: name
-
name: title
label: Label
selector: title
# Under 'ids', we identify source fields populated above which will uniquely
# identify each imported item. The 'type' makes sure the migration map table
# uses the proper schema type for stored the IDs.
ids:
machine_name:
type: string
process:
label:
-
plugin: explode
source: title
delimiter: '|'
-
plugin: extract
index:
- 0
type:
plugin: default_value
default_value: department
uid:
plugin: default_value
default_value: 1
langcode:
plugin: default_value
default_value: en
field_shortcode/value: shortcode
destination:
plugin: 'entity:group'
migration_dependencies: null
