-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set id of CSV migration row based on line number #10
Comments
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. |
👋 Thanks for commenting! 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".: 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 :
|
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! 🤓 |
If somebody still searching for resolving for latest module.
|
https://eiriksm.dev/set-id-csv-migration-row-number
The text was updated successfully, but these errors were encountered: