I’m a little bit new in Drupal but experienced in PHP. I would like to migrate data from CSV and assign to existing nodes in DB.
My question is about the possibility to match processing rows with existing data from the database.
I mean, I have CSV file with data and with foreign key
called: SERVICE_ACTION
and now I would like to assign that data to existing NODE which hasn’t SERVICE_ACTION
key but has different KEY which is assigned to another specific entity with Service Action key. How can I get ID of that entity in migration script to assign?
Perhaps, I need target_id to assign newly created paragraph to the specific node. I’m not sure what I’m working bad.
langcode: en status: true dependencies: enforced: module: - xxx_migration - paragraphs id: xxx_release_notes migration_tags: - custom-migrate - soap-apis migration_group: xxx_soap_api label: 'xxx release notes' source: plugin: csv data_fetcher_plugin: file path: modules/custom/xxx_migration/artifacts/releases_notes.csv header_row_count: 1 keys: - id column_names: - id: 'Unique Id' - title: Title - body: 'Post body' - service_action_code: 'Service Action Code' process: type: plugin: default_value default_value: people field_service_action_code: plugin: migration_lookup migration: xxx_release_notes source: service_action_code destination: plugin: 'entity_reference_revisions:paragraph' default_bundle: release_note migration_dependencies: required: { } optional: { }
here is my CSV file:
id,title,body,service_action_code 1,TITLE,example body,PassengerDetailsRQ 2,TITLE2,example body2,ePaymentRQ