The migration lookup plugin can be used in two ways:
uid:
plugin: migration_lookup
migration: users
source: author
There's a single source key, and its value is taken from the 'author' value in the row.
uid:
plugin: migration_lookup
migration:
- users
- members
source_ids:
users:
- author
members:
- id
The plugin will try multiple migrations in turn, and for each migration to lookup, the source is specified for each one.
In both cases, this is a single source key.
However, migrations often have more than one source key.
Because of how lookupDestinationIds() works, the key used by the lookup plugin is assumed to be the first one:
* @param array $source_id_values
* The source identifier keyed values of the records, e.g. ['nid' => 5].
* If unkeyed, the first count($source_id_values) keys will be assumed.
What's missing is:
1. The ability to specify multiple source keys
2. The ability to specify specific source keys. E.g. the migration to use as a lookup might have keys alpha, beta, gamma, and in migration needs to look up using the beta key.