Created
December 10, 2015 16:46
-
-
Save selwynpolit/bb1377effd6a82a22b18 to your computer and use it in GitHub Desktop.
Drupal 8 migration from sage api
This file contains 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
# Migration configuration for recipe content. | |
id: recipe_node | |
label: Recipes from Sage | |
migration_group: recipe | |
source: | |
plugin: wfm_migrate_recipe | |
destination: | |
plugin: entity:node | |
process: | |
# Hardcode the destination node type (bundle) as 'migrate_example_recipe'. | |
type: | |
plugin: default_value # source plugin | |
default_value: recipe # assuming | |
title: title #implied plugin is default "get" | |
# nid: _id # Note. comment nid out so migrate will auto generate a nid | |
# else nid is expecting a value for the nid | |
langcode: | |
plugin: default_value | |
source: language | |
default_value: "und" | |
uid: | |
plugin: default_value | |
default_value: 1 | |
sticky: | |
plugin: default_value | |
default_value: 0 | |
'field_recipe_body/value': directions | |
'field_recipe_body/summary': description | |
field_recipe_cook_time: cook_time | |
field_recipe_mongo_id: _id | |
field_recipe_nutritional_info: basic_nutrition | |
# $this->addFieldMapping('field_nutritional_info:format') | |
# ->defaultValue('full_html'); | |
'field_recipe_nutritional_info/0/format': | |
plugin: default_value | |
default_value: 'full_html' | |
field_recipe_short_description: description | |
# Some Drupal fields may have multiple components we may want to set | |
# separately. For example, text fields may have summaries (teasers) in | |
# addition to the full text value. We use / to separate the field name from | |
# the internal field value being set, and put it in quotes because / is a | |
# YAML special character. | |
#field_recipe_featured: | |
# needs to have another migration to pull in the files | |
# will need to have a dependencies of that migration | |
#field_recipe_hero_image: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment