Skip to content

Instantly share code, notes, and snippets.

@dinarcon
Last active April 8, 2020 12:23
Show Gist options
  • Save dinarcon/5bf0c0f4cf61a28910f97c16c7372e15 to your computer and use it in GitHub Desktop.
Save dinarcon/5bf0c0f4cf61a28910f97c16c7372e15 to your computer and use it in GitHub Desktop.
process:
title:
- plugin: concat
source:
- source_first_name
- source_last_name
delimiter: ' '
- plugin: callback
callable: strtoupper
process:
destination_field:
- plugin: plugin_name
source: source_column_name
config_1: value_1
config_2: value_2
- plugin: plugin_name
config_1: value_1
config_2: value_2
- plugin: plugin_name
config_1: value_1
config_2: value_2
process:
field_online_profiles/0/uri: source_drupal_profile
field_online_profiles/0/title:
plugin: default_value
default_value: 'Drupal.org profile'
field_online_profiles/1/uri: source_gitlab_profile
field_online_profiles/1/title:
plugin: default_value
default_value: 'GitLab profile'
field_online_profiles/2/uri: source_github_profile
field_online_profiles/2/title:
plugin: default_value
default_value: 'GitHub profile'
process:
destination_field/0/subfield_1:
plugin: plugin_name
config_1: value_1
config_2: value_2
destination_field/0/subfield_2:
plugin: plugin_name
config_1: value_1
config_2: value_2
destination_field/1/subfield_1:
plugin: plugin_name
config_1: value_1
config_2: value_2
destination_field/1/subfield_2:
plugin: plugin_name
config_1: value_1
config_2: value_2
process:
field_online_profiles/0: source_drupal_profile
field_online_profiles/1: source_gitlab_profile
field_online_profiles/2: source_github_profile
process:
field_online_profiles:
plugin: get
source: source_drupal_profile
process:
destination_field:
plugin: plugin_name
config_1: value_1
config_2: value_2
config_3: value_3
process:
field_online_profiles: source_drupal_profile
process:
field_online_profiles/uri: source_drupal_profile
field_online_profiles/title:
plugin: default_value
default_value: 'Drupal.org profile'
process:
destination_field/subfield_1:
plugin: plugin_name
config_1: value_1
config_2: value_2
destination_field/subfield_2:
plugin: plugin_name
config_1: value_1
config_2: value_2
source:
constant:
LINK_TITLE: 'Online profile'
process:
pseudo_link_text:
- plugin: get
source: constant/LINK_TITLE
- plugin: callback
callable: strtoupper
field_online_profiles/0/uri: source_drupal_profile
field_online_profiles/0/title: '@pseudo_link_text'
field_online_profiles/1/uri: source_gitlab_profile
field_online_profiles/1/title: '@pseudo_link_text'
field_online_profiles/2/uri: source_github_profile
field_online_profiles/2/title: '@pseudo_link_text'
field_primary_profile: '@field_online_profiles/0'
source:
constant:
DRUPAL_LINK_TITLE: 'Drupal.org profile'
GITLAB_LINK_TITLE: 'GitLab profile'
GITHUB_LINK_TITLE: 'GitHub profile'
process:
field_online_profiles/0/uri: source_drupal_profile
field_online_profiles/0/title: constant/DRUPAL_LINK_TITLE
field_online_profiles/1/uri: source_gitlab_profile
field_online_profiles/1/title: constant/GITLAB_LINK_TITLE
field_online_profiles/2/uri: source_github_profile
field_online_profiles/2/title: constant/GITHUB_LINK_TITLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment