I'm doing a migration into D8, and I'm migrating into a custom video player field with multiple values. Here's the schema for the field as defined in its plugin:
public static function schema(FieldStorageDefinitionInterface $field_definition) {
return array(
'columns' => array(
'vid' => array(
'type' => 'int',
'size' => 'normal',
'not null' => TRUE,
'default' => 0,
),
'video' => array(
'type' => 'varchar',
'length' => 256,
'not null' => FALSE,
),
'video_hd' => array(
'type' => 'varchar',
'length' => 256,
'not null' => FALSE,
),
'video_sm' => array(
'type' => 'varchar',
'length' => 256,
'not null' => FALSE,
),
'thumbnail' => array(
'type' => 'varchar',
'length' => 256,
'not null' => FALSE,
),
'poster' => array(
'type' => 'varchar',
'length' => 256,
'not null' => FALSE,
),
'show_ads' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => '1',
),
'raw_file' => array(
'type' => 'varchar',
'length' => 256,
'not null' => FALSE,
),
),
);
}
I have a custom source plugin that gathers all of the information needed for these columns into appropriately named items. My question is, how do I get those pieces of data into the destination field. Can I do it in the .yml file configuration, as can be done with the body field?
'body/format':
plugin: migration
migration: d6_filter_format
source: format
'body/value': node_body
'body/summary': teaser
Or do I need to have a custom destination plugin that takes these pieces of data and puts them into the correct places in the node? I'm seeing a lot of blogs and documentation on source and process plugins, but not much on destination plugins, so I'm not sure.
Thanks.