Last active
February 14, 2018 03:58
-
-
Save mohit-rocks/ba3b1003cc88ff077f4ad466c46e40da to your computer and use it in GitHub Desktop.
Migration template : Specify custom ID Map Plugin (Drupal 8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: node_page | |
label: "Page Content" | |
migration_tags: | |
- content_import | |
# Notice ID Map plugin here. | |
idMap: | |
plugin: content_update | |
# ID Map plguin declaration ends. | |
source: | |
plugin: csv | |
path: 'public://example.csv' | |
header_row_count: 1 | |
keys: | |
- 'Item-ID' | |
fields: | |
Item-ID: Unique identifier for each page. | |
Page name: Name of the page. | |
Page category: Page category. | |
process: | |
type: | |
plugin: default_value | |
default_value: page | |
title: Page name | |
langcode: | |
plugin: default_value | |
default_value: "en" | |
field_page_category: | |
- | |
plugin: skip_on_empty | |
method: row | |
source: Page category | |
message: "Row skipped due to empty Page category" | |
field_page_unique_id: | |
- | |
plugin: skip_on_empty | |
method: row | |
source: Item-ID | |
message: "Row skipped due to empty Item-ID value" | |
destination: | |
plugin: entity:node | |
translations: true | |
migration_dependencies: | |
required: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment