I have a JSON file with an entry that looks like this:
In my YML file I have it mapped like this:
field_abc_asset_taxonomy_auto: - plugin: skip_on_empty method: process source: taxonomy - plugin: explode delimiter: / - plugin: callback callable: ltrim - plugin: callback callable: rtrim - plugin: entity_generate value_key: name entity_type: taxonomy_term bundle_key: vid bundle: abc_asset_taxonomy_auto
This works in that it brings over the terms correctly, but in a flat file. I need them to come over so that each term is a child of the term before it so:
The problem is there is an unknown number of items. It could be 2, it could be 10.
Is there a way to migrate hierarchical taxonomy with an unknown number of parent child relationships?
Note, I've seen several examples that use a determinant number of sources but this wouldn't work here. The "Migrate Hierarchical Taxonomy" module uses a determinant number as well. How can I achieve this with the Migrate API preferably without writing a custom plugin?