0

In a custom module (assoc), I have a custom Content Entity (Member).
I migrated Member content from a Drupal 6 site using Migrate Source CSV, Migrate Plus, Migrate Tools and this migration file:

id: migration_members
migration_tags: null
migration_group: null
label: 'Member migration from CSV'
source:
  plugin: csv
  path: /Users/efalzon/Sites/JdP8/config/migration_Members.csv
  delimiter: ';'
  enclosure: '"'
  header_row_count: 1
  ids:
    - id
process:
  id: id
  designation: designation
  addresssupplement: addresssupplement
  street: street
  postalcode: postalcode
  city: city
  country:
    plugin: default_value
    default_value: FR
  telephone: telephone
  status: status
  startdate: startdate
  enddate: enddate
  contact_id: uid
  comment : comment
  owner_id:
    plugin: default_value
    default_value: 1
destination:
  plugin: 'entity:member'
migration_dependencies:
  required: {}
  optional: {}

Then I created another migration that allows me to update Member content:

id: migration_updatemembers
migration_tags: null
migration_group: null
label: 'Update Member from CSV'
source:
  plugin: csv
  track_changes: true
  path: sites/default/files/_private/migration_UpdateMembers.csv
  delimiter: ';'
  header_row_count: 1
  ids:
    - id
process:
  id: id
  status: status
  enddate: enddate
destination:
  plugin: 'entity:member'
migration_dependencies:
  required: {}
  optional: {}

I would like to add a 'Comment' field in this 2nd migration which is easy:

process:
  id: id
  status: status
  enddate: enddate
  comment : comment

should do the job.
But this will replace existing content in 'Comment'.
I'd like to add what is found in the csv file to this existing content.
How can I do that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.