I need to import a group of authors as part of a content entity. It is an array in a JSON object with id / name. I have a content type field in Drupal to be a user reference that accepts unlimited cardinality.
First of all, I do not know these users in advance, no way to query them. So I can not just create a migration dependency and do it first. This seems to be a popular answer, but it does not fit with my use cases.
Second, I think you should be able to take over the source data and loop and create a user stub if they do not already exist. How you do that? If the user does not already exist, they should be created. If they exist, just search for the user ID and paste it into the target ID per line.
This is not the only place I come across that will have content related to content that I have to stub. I do not know the last content until I later do the migrations.
Is that even possible in D8?