commerce_export-8.x-1.0-alpha1/config/install/migrate_plus.migration.import_paragraph_tab.yml
config/install/migrate_plus.migration.import_paragraph_tab.yml
# Import a paragraph type that references a different paragraph type # # Import two paragraph entities. The paragraph entity has 3 fields, two single # valued text fields and a multi-valued paragraph field. # # Destination site configuration: # - Install the Paragraph Module. # - Create a paragraph type with three fields, two single values text fields # and a multi-value paragraph field for referenceing the Call To Action # paragraph type. # id: import_paragraph_tab label: Paragraph tab migration_group: commerce_export source: plugin: product_tab_csv path: 'public://import/product.csv' header_row_count: 1 enclosure: '"' keys: - tab_title column_names: 0: title: Title 1: sku: SKU 33: tab_title1: 'Tab title 1' 34: tab_content1: 'Tab content 1' 35: tab_cta1: 'Associated tab CTA 1' 36: tab_title2: 'Tab title 2' 37: tab_content2: 'Tab content 2' 38: tab_cta2: 'Associated tab CTA 2' process: # Text (plain), single value. field_tab_title: tab_title # Text (formatted, long), single value. field_tab_content: tab_content # Entity reference revisions, Unlimited. field_tab_cta/target_id: - plugin: migration_lookup migration: import_paragraph_cta no_stub: true source: - tab_cta - plugin: skip_on_empty method: process - plugin: extract index: - '0' field_tab_cta/target_revision_id: - plugin: migration_lookup migration: import_paragraph_cta no_stub: true source: - tab_cta - plugin: skip_on_empty method: process - plugin: extract index: - '1' destination: plugin: 'entity_reference_revisions:paragraph' default_bundle: tabs migration_dependencies: required: - import_paragraph_cta