Why is ID mandatory? What if i just want it auto-incremented? Seems there will be many collisions if you are required to specify. For certain data, I simply want the next available ID and on. Would I really have to write code to get the first node desc id - in order to do this? Seems like ids or similar should be a function.
The id in question is the migration row Id. In the article it has no relationship to the node id. You have to have a migration row Id to be able to re-run migrations and only migrate changes, for example. Sorry if that was not clear 😬🤓
I am using drupal 9.3 & migrate_plus 5 and I cannot get this working. Do the examples in your blog work with the most recent versions?
I had to changed "keys" for "ids".: You must declare "ids" as a unique array of fields in your source settings.
This may be because of recent changes in the csv source plugin or drupal 9 core migrate.
Also the ID you set in prepareRow() is not recognized. The migration fails before prepareRow() because it looks for a ID column in the CSV :
[error] Migratie mislukt met bronplugin-melding: 'my_id' is defined as a source ID but has no value. in /var/www/html/web/core/modules/migrate/src/Row.php regel 107
(apologies for the partial dutch message)
I see. This was indeed tested on earlier versions so I would have to look at it again when I get the time, to update the article. If you find out what changed in the meantime, it would be fantastic if you are able to share that! 🤓