Importing Hierarchy taxonomy terms problem

Created on 3 January 2024, 11 months ago
Updated 17 January 2024, 10 months ago

I have a csv file with a lot of taxonomy terms like the one shown below.

But the terms is added with a top level term with lorem ipsum title, have this yml defined. See the screenshot.

looks like all terns with parent = 0 is created with the lorem ipsum, but i dont want that, is that possible ?

id: categories
label: Import categories
migration_group: categories

source:
  plugin: csv
  path: 'public://import/category.csv'
  header_row_count: 1
  delimiter: ";"
  ids: [tid]
  fields:
    -
      name: tid
      label: 'Unique ID'
    -
      name: name
      label: 'The title'
    -
      name: description
      label: 'the description'
    -
      name: weight
      label: 'the weight'
    -
      name: parent
      label: 'the parent subject'

process:
  name: name
  description: description
  weight: weight
  parent:
    - plugin: migration_lookup
      migration: categories
      source: parent

destination:
  plugin: entity:taxonomy_term
  default_bundle: category

This is an example of the data file

"tid";"name";"description";"weight";"parent"
210;"Årbøger (børn og unge) ";"YDA";-1;209
209;"Børn og unges poesi, antologier, årbøger ";"YD";-1;180
2016;"Parlører ";"WTK";-1;2003
2005;"Rejse- og ferieguides ";"WTH";-1;2003
2017;"Rejsebeskrivelser ";"WTL";-1;2003
180;"Børn og unges samt pædagogiske bøger";"Y";0;0
2021;"Rejsekort og atlas ";"WTR";-1;2003
2004;"Rejsetips og råd: Generelt ";"WTD";-1;2003
101;".Net programmering ";"UMPN";0;100
2331;"1. Verdenskrig";"HBWN";0;2323
2333;"2. Verdenskrig";"HBWQ";0;2323
2304;"20. Århundredes efterkrigshistorie, fra ca. 1945 til ca. 2000";"HBLW3";0;2303
2303;"20. Århundredes historie: ca. 1900 til ca. 2000";"HBLW";0;2296
2305;"21. Århundredes historie: fra ca. 2000";"HBLX";0;2296
65319;"2D-grafik: Spilprogrammering";"UMKB";0;95
1797;"3-D billeder og optiske illusioner";"WDJ";0;1792
2003;"Rejser og ferie ";"WT";0;1741
47;"3D grafik og modellering";"UGK";0;42
96;"3D grafik: Spilprogrammering";"UMKC";0;95
1329;"Åbent læringsmiljø, selvstudie, fjernundervisning";"JNQ";0;1292
126;"Access ";"UNSC";0;124
💬 Support request
Status

Fixed

Version

6.0

Component

Plugins

Created by

🇩🇰Denmark ramlev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024