In the Drupal 7 migrate module, you can use ‘csvrownum’ as the mapping key when migrating content from a CSV (https://www.drupal.org/node/1152158). For the Drupal 8 version, I am not sure what the equivalent is. Here is my yml file configuration (migrate plus):
id: timesheet_data label: Importing Timesheet migration_group: csvimport migration_tags: - node - csvimport source: plugin: csv path: 'somepath/timesheet.csv' header_row_count: 1 keys: - csvrownum column_names: 0: name: Name of Contact 1: address: Address destination: plugin: 'entity:node' default_bundle: timesheets process: title: name
I tried this approach thinking it might be similar to the drupal 7 migrate module. I also tried not specifying a key, both resulted in an error.