Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save dinarcon/bcbaf9f327ff7b0c6de9f44c9baa98b4 to your computer and use it in GitHub Desktop.
destination:
plugin: 'entity:node'
default_bundle: article
$ drush migrate:import udm_dependencies_intro_node --execute-dependencies
$ drush migrate:import --tag='UD Articles,UD Example'
$ drush migrate:rollback --tag='UD Articles,UD Example'
$ drush migrate:import udm_dependencies_intro_image
$ drush migrate:import udm_dependencies_intro_node
migration_dependencies:
required:
- udm_dependencies_intro_image
optional: []
migration_tags:
- UD Articles
- UD Example
process:
title: name
field_image/target_id:
plugin: migration_lookup
migration: udm_dependencies_intro_image
source: photo_file
field_image/alt:
plugin: concat
source:
- constants/PHOTO_DESCRIPTION_PREFIX
- name
delimiter: ' '
source:
constants:
PHOTO_DESCRIPTION_PREFIX: 'Photo of'
plugin: embedded_data
data_rows:
- unique_id: 1
name: 'Michele Metts'
photo_file: 'P01'
- unique_id: 2
name: 'David Valdez'
photo_file: 'P03'
- unique_id: 3
name: 'Clayton Dewey'
photo_file: 'P04'
ids:
unique_id:
type: integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment