· 6 years ago · Dec 19, 2018, 02:48 PM
1# Migration configuration for products.
2id: product
3label: 'Product'
4migration_group: Products
5# Here we define the migration source
6source:
7 plugin: url
8 track_changes: true
9 cache_counts: true
10 data_fetcher_plugin: http
11 data_parser_plugin: json
12 urls: 'https://base_url/endpoint’
13 item_selector: data/
14 fields:
15 -
16 name: uuid
17 label: 'uuid'
18 selector: uuid
19
20 -
21 name: title
22 label: 'title'
23 selector: name
24
25 ids:
26 uuid:
27 type: string
28
29
30 authentication:
31 plugin: oauth2
32 grant_type: client_credentials
33 base_uri: ‘base_url’
34 token_url: '/oauth/token/'
35 client_id: my_id
36 client_secret: ‘my_client_secret’
37 headers:
38 Accept: 'application/json'
39 Content-Type: 'application/json'
40
41 destination:
42 plugin: 'entity:node'
43
44 process:
45 type:
46 plugin: default_value
47 default_value: produkt
48
49 title: name
50 field_uuid: uuid
51
52 sticky:
53 plugin: default_value
54 default_value: 0
55 uid:
56 plugin: default_value
57 default_value: 0
58
59 migration_dependencies:
60 required: {}
61 optional: {}
62
63 dependencies:
64 enforced:
65 module:
66 - migrate_products