Drupal Answers Asked by webuser57 on December 10, 2021
has the following value:
The 10 values should be imported into Drupal, version 8.
In order not to have to read out these 10 terms from the database, I would like to "write these values into a YML import file" and import them that way.
How can you do that?
Here is the first draft of the YML file:
id: k1_import
label: 'Daten import'
migration_group: k1_migration
source:
plugin: k1import
key: migration_k1
process:
title: Firma
title: Auto
…
got a tip from a friend, here are the links:
https://www.drupal.org/docs/8/api/migrate-api/migrate-destination-plugins-examples/migrating-users
Here's my solution, in a nutshell, begin of the YML file:
id: k1_import
label: 'Daten import'
migration_group: k1_migration
source:
plugin: embedded_data
data_rows:
-
name_id: 1
name: Firma
-
name_id: 2
name: Landwirtschaft
-
name_id: 3
name: Auto
-
name_id: 4
name: Stadt
ids:
name:
type: string
process:
name: name
destination:
plugin: 'entity:taxonomy_term'
default_bundle: daten_import
End of the YML file.
Answered by webuser57 on December 10, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP