"node_a_migration" is the migration ID of nodes of type "node_a"
"node_b_migration" is the migration ID of nodes of type "node_b"
I'd like to use either "node_a_migration" or "node_b_migration" as a migration_lookup depending on other field value.
The source (not a drupal site, entities of content A and content B can have the same id, because stored in different tables) :
[ ['entity_type' => 'content_a', 'entity_id' => 123], ['entity_type' => 'content_b', 'entity_id' => 123], ]
The migration config :
process: pseudo_field_migration_id: plugin: static_map map: content_a: node_a_migration content_b: node_b_migration source: entity_type field_entity_reference: plugin: migration_lookup migration: '@pseudo_field_migration_id' source: entity_id
There is no error when running the migration, but the field_entity_reference is not populated.
It works if I manually replace '@pseudo_field_type_id' by node_a_migration
Any idea how to make it work ?