I would like to import some taxonomy terms with a taxonomy term in it.
field_regio2
is a entityreference
field to an existing taxonomy term Regio
.
But for some reason it is not working. Everything is working except the field_regio2
.
$ drush mmsg import_gemeentes gives:
the entity_lookup plugin requires a value_key, none located
?
uuid: 7eef6b86-80db-40ab-8359-91d20675e0f2
langcode: en
status: true
dependencies: { }
id: import_gemeentes
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags: null
migration_group: migrated_terms
label: 'Migrate gemeentes from the source CSV to taxonomy terms'
source:
plugin: csv
path: 'public://gemeentes.csv'
header_row_count: 1
keys:
- id
column_names:
-
id: id
-
vid: vid
-
name: name
-
field_stratenplan_luchtfoto_refe: field_stratenplan_luchtfoto_refe
-
rid: rid
-
rid22: rid2
process:
vid:
plugin: default_value
default_value: gemeente
name: name
field_stratenplan_luchtfoto_refe: field_stratenplan_luchtfoto_refe
field_regio: rid
field_regio2:
plugin: entity_generate
source: rid22
destination:
plugin: 'entity:taxonomy_term'
migration_dependencies: null
vid
it is better to use thedefault_value plugin
. I have updated the code, if someone needs it. First, I added an extra column in the CSV filevid = gemeente
, but that is not working.