Skip to content

Instantly share code, notes, and snippets.

@dinarcon
Last active August 10, 2019 04:28
Show Gist options
  • Select an option

  • Save dinarcon/5919d6b2e244a27602decb4e51116133 to your computer and use it in GitHub Desktop.

Select an option

Save dinarcon/5919d6b2e244a27602decb4e51116133 to your computer and use it in GitHub Desktop.
process:
field_photos/0/target_id: source_fid_first
field_photos/0/alt: source_alt_first
field_photos/1/target_id: source_fid_second
field_photos/1/alt: source_alt_second
field_photos/2/target_id: source_fid_third
field_photos/2/alt: source_alt_third
destination:
plugin: 'entity:node'
default_bundle: article
migration_dependencies:
required:
- udm_dependencies_multivalue_term
optional: []
process:
title: thoughtful_title
field_tags:
- plugin: skip_on_empty
source: fruit_list
method: process
message: 'No fruit_list listed.'
- plugin: explode
delimiter: ','
- plugin: migration_lookup
migration: udm_dependencies_multivalue_term
source:
plugin: embedded_data
data_rows:
- unique_id: 1
thoughtful_title: 'Amazing recipe'
fruit_list: 'Green apple, Banana, Pear'
- unique_id: 2
thoughtful_title: 'Fruit-less recipe'
ids:
unique_id:
type: integer
destination:
plugin: 'entity:taxonomy_term'
default_bundle: tags
process:
name: fruit_name
description: fruit_description
parent:
plugin: migration_lookup
migration: udm_dependencies_multivalue_term
source: fruit_parent
source:
plugin: embedded_data
data_rows:
- fruit_name: 'Grape'
fruit_description: 'Eat fresh or prepare some jelly.'
- fruit_name: 'Red grape'
fruit_description: 'Sweet grape'
fruit_parent: 'Grape'
- fruit_name: 'Pear'
fruit_description: 'Eat fresh or prepare a jam.'
ids:
fruit_name:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment