How can I import fields into Drupal 8.4 user profile from a csv file that has identical values in the key row?

by Markus Zerres   Last Updated January 13, 2018 18:07 PM

I'm using Migrate Tools, Migrate Plus and Migrate Source CSV. My CSV file looks like that:

"user2";"black";"rotten banana"

I'm using the Profile Module (

I have a migration within my migration group that looks like this (migrate_plus.migration.user_vorlesungen.yml):

id: user_vorlesungen
langcode: de
status: true
            - user_migrate
migration_group: hoevwa
label: 'HoeVWA Vorlesungen Import'
    plugin: csv
    track_changes: true
    path: /config/Vorlesungsverzeichnis.csv
    # Column delimiter. Comma (,) by default.
    delimiter: ';'
    # Field enclosure. Double quotation marks (") by default.
    enclosure: '"'
    header_row_count: 1
        - Stg
    plugin: entity:profile
        plugin: default_value
        default_value: 'vorlesungen'
        plugin: migration_lookup
        no_stub: true
        # previous user migration
        migration: user__hoerer
        # property in the source data
        source: Stg
    # These field have multiple values in D8
    field_color: Color
    field_fruit: Fruit

    required: {  }
    optional: {  }

In my YAML file the content is printed like that:

    <td>{{ content.field_color }}</td>
    <td>{{ content.field_fruit }}</td>

When I run drush mim --group=hoevwa only the last values of user1 (blue, pear) are imported. How can I get running a process plugin to loop through the CSV and get all values imported. And finally how can I loop through all values in my TWIG Template?

Tags : migration

Related Questions

Migrate Dimensions

Updated April 23, 2015 00:03 AM

Migrate class not registering properly

Updated July 26, 2015 13:03 PM

Display inline images imported from phpBB

Updated April 08, 2015 18:03 PM