Question similar to this question here, but this time, I am not doing a separate migration later.

I want to create taxonomy terms if they do not exist while processing a record. Does entity_lookup do this in the same way migration_lookup does for stubbing? In this case, I won't be doing another migration to fill in a stub, but surely there must be a way to create a term and keep going.

I don't see anything in entity_lookups plugin indicating it will create if not found.

  • Use entity_generate, it is basically lookup + generate if not exists Doc – Hudri Mar 12 '19 at 15:56

Wow, ok, getting better at parsing the docs/code for migrate plus. I found it as soon as I posted. The entity_generate plugin will do this behavior.

    plugin: entity_generate
    source: jel_codes

Now I have a system full of taxonomy.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.