You are here

magento2_user.yml in Commerce Migrate 3.0.x

modules/magento/migrations/magento2_user.yml

File

modules/magento/migrations/magento2_user.yml
View source
  1. id: magento2_user
  2. label: User accounts
  3. audit: true
  4. migration_group: commerce_migrate_magento2
  5. migration_tags:
  6. - Content
  7. - Magento 2
  8. source:
  9. # Uses a custom source plugin to yield the top level category.
  10. plugin: magento2_csv
  11. # Change the path and filename to match your source CSV file.
  12. path: 'public://import/magento2_customer_address_20180618_003449.csv'
  13. # Change the enclosure character to suit your source CVS file.
  14. enclosure: "\""
  15. # Change the number of header rows to suit your source CVS file.
  16. header_offset: 0
  17. # The key field is the top level category determined from the 'categories'
  18. # column. The source plugin determines the vocabulary name and adds it to
  19. # the source row indexed by 'vocabulary'.
  20. ids: [_entity_id]
  21. process:
  22. exist:
  23. -
  24. plugin: entity_lookup
  25. source: _email
  26. value_key: mail
  27. entity_type: user
  28. -
  29. plugin: callback
  30. callable: is_null
  31. -
  32. plugin: skip_on_empty
  33. method: row
  34. name_first:
  35. -
  36. plugin: concat
  37. delimiter: ' '
  38. source:
  39. - firstname
  40. - middlename
  41. -
  42. plugin: callback
  43. callable: trim
  44. name:
  45. -
  46. plugin: concat
  47. delimiter: ' '
  48. source:
  49. - '@name_first'
  50. - lastname
  51. -
  52. plugin: skip_on_empty
  53. method: row
  54. mail:
  55. plugin: skip_on_empty
  56. source: _email
  57. method: row
  58. language: destination_default_langcode
  59. langcode:
  60. plugin: user_langcode
  61. source: '@language'
  62. fallback_to_site_default: false
  63. preferred_langcode:
  64. plugin: user_langcode
  65. source: '@language'
  66. fallback_to_site_default: true
  67. preferred_admin_langcode:
  68. plugin: user_langcode
  69. source: '@language'
  70. fallback_to_site_default: true
  71. destination:
  72. plugin: entity:user