migrate_plus.migration.d6_edlp_corpus.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. id: d6_edlp_corpus
  2. label: Edlp Drupal 6 corpus
  3. migration_tags:
  4. - Drupal 6
  5. deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
  6. migration_group: d6_edlp
  7. source:
  8. plugin: d6_edlp_corpus
  9. node_type: corpus
  10. process:
  11. # In D6, nodes always have a tnid, but it's zero for untranslated nodes.
  12. # We normalize it to equal the nid in that case.
  13. # @see \Drupal\node\Plugin\migrate\source\d6\Node::prepareRow().
  14. # If you are using this file to build a custom migration consider removing
  15. # the nid and vid fields to allow incremental migrations.
  16. # nid: tnid
  17. # vid: vid
  18. type:
  19. plugin: default_value
  20. default_value: enregistrement
  21. langcode:
  22. plugin: default_value
  23. source: language
  24. default_value: "und"
  25. title:
  26. -
  27. plugin: get
  28. source: title
  29. -
  30. plugin: skip_on_empty
  31. method: row
  32. # this is not working :(
  33. uid:
  34. -
  35. plugin: migration_lookup
  36. migration: d6_edlp_users
  37. source: node_uid
  38. -
  39. plugin: default_value
  40. default_value: 1
  41. # status: status
  42. created: created
  43. changed: changed
  44. promote: promote
  45. sticky: sticky
  46. revision_uid: revision_uid
  47. revision_log: log
  48. revision_timestamp: timestamp
  49. 'field_description/value': body
  50. 'field_description/format':
  51. plugin: default_value
  52. default_value: wysiwyg
  53. # ARTICLE (body)
  54. # node ref -> text
  55. 'body/value': article
  56. 'body/format':
  57. plugin: default_value
  58. default_value: wysiwyg
  59. # taxo term -> entity ref terms
  60. # use this one for fetchCol in plugin
  61. field_entrees:
  62. plugin: migration_lookup
  63. migration: d6_edlp_entrees
  64. source: entrees
  65. # use this one for fetchAll in plugin
  66. # field_entrees:
  67. # -
  68. # plugin: iterator
  69. # source: entrees
  70. # process:
  71. # id: tid
  72. # -
  73. # plugin: flatten
  74. # -
  75. # plugin: migration_lookup
  76. # migration: d6_edlp_entrees
  77. # no_stub: true
  78. # field_entrees:
  79. # plugin: iterator
  80. # source: entrees
  81. # process:
  82. # plugin: migration_lookup
  83. # migration: d6_edlp_entrees
  84. # field_genre -> field_genres
  85. field_genres:
  86. plugin: migration_lookup
  87. migration: d6_edlp_genres
  88. source: genres
  89. # field_genres:
  90. # -
  91. # plugin: iterator
  92. # source: field_genre
  93. # process:
  94. # id: value
  95. # -
  96. # plugin: flatten
  97. # -
  98. # plugin: migration_lookup
  99. # migration: d6_edlp_genres
  100. # taxo term -> entity ref terms
  101. field_langues:
  102. plugin: migration_lookup
  103. migration: d6_edlp_langues
  104. source: langues
  105. # field_artiste: field_locuteurs
  106. # text -> entity ref terms
  107. # instead of entity_generate, i create the term in prepareRow from plugin
  108. field_locuteurs: locuteurs
  109. # field_locuteurs:
  110. # plugin: entity_generate
  111. # entity_type: taxonomy_term
  112. # bundle_key: vid
  113. # bundle: locuteurs
  114. # source: locuteurs
  115. # # value_key: field_artiste_value
  116. # field_compositeur: field_collectionneurs
  117. # text -> entity ref terms
  118. # instead of entity_generate, i create the term in prepareRow from plugin
  119. field_collectionneurs: collectionneurs
  120. # # file
  121. # # field_mp3 -> field_son
  122. field_son:
  123. plugin: migration_lookup
  124. migration: d6_edlp_allfiles
  125. source: sons_fid
  126. # field_son:
  127. # # plugin: migration_lookup
  128. # # migration: d6_edlp_allfiles
  129. # # source: fid
  130. # plugin: iterator
  131. # source: field_mp3
  132. # process:
  133. # target_id:
  134. # plugin: migration_lookup
  135. # migration: d6_edlp_allfiles
  136. # source: fid
  137. # workflow
  138. # status:
  139. # plugin: static_map
  140. # source: workflow
  141. # map:
  142. # 1: 0
  143. # 2: 0
  144. # 3: 1
  145. # 4: 1
  146. status:
  147. plugin: default_value
  148. default_value: 1
  149. field_workflow:
  150. plugin: default_value
  151. default_value: "corpus_documents_publie"
  152. destination:
  153. plugin: entity:node
  154. migration_dependencies:
  155. required:
  156. - d6_edlp_users
  157. - d6_edlp_entrees
  158. - d6_edlp_genres
  159. - d6_edlp_langues
  160. - d6_edlp_allfiles