Sometimes a simple callback is all that is needed to migrate content, but if you have a multi value field you cant just pass the entire field to the callback plugin as you might be passing an array to a function that expects a string.
For example, to migrate the content of a multi-value field and also convert that field to lowercase (via strtolower) you would do this.
field_destination:
- plugin: sub_process
source: field_source
process:
value:
- plugin: callback
callable: strtolower
source: value
The field_destination field now contains the content of field_source, but converted to lowercase.
Add new comment