magento2_category.yml in Commerce Migrate 8.2
Same filename and directory in other branches
modules/magento/migrations/magento2_category.yml
File
modules/magento/migrations/magento2_category.ymlView source
- # Migrate top level category to taxonomy vocabulary.
- # This migration uses a source CSV file created using the Magento 2 export
- # command, System->Export and selecting Products.
- id: magento2_category
- label: Migrate Magento 2 category to taxonomy vocabulary.
- migration_group: commerce_migrate_magento2
- migration_tags:
- - Magento 2
- - Configuration
- source:
- # Uses a custom source plugin to yield the top level category.
- plugin: magento2_category_csv
- # Change the path and filename to match your source CSV file.
- path: 'public://import/magento2-catalog_product_20180326_013553.csv'
- # Change the enclosure character to suit your source CVS file.
- enclosure: "\""
- # Change the number of header rows to suit your source CVS file.
- header_offset: 0
- # The key field is the top level category determined from the 'categories'
- # column. The source plugin determines the vocabulary name and adds it to
- # the source row indexed by 'vocabulary'.
- ids: [vocabulary]
- # Set constants for values not in the source data.
- constants:
- description: NULL
- hierarchy: 0
- weight: 0
- process:
- vid:
- -
- plugin: machine_name
- source: vocabulary
- -
- plugin: skip_on_empty
- method: row
- -
- plugin: substr
- start: 0
- length: 32
- exists:
- -
- plugin: entity_exists
- source: '@vid'
- entity_type: taxonomy_vocabulary
- -
- plugin: callback
- callable: is_bool
- -
- plugin: skip_on_empty
- method: row
- label: vocabulary
- name: vocabulary
- description: constants/description
- hierarchy: constants/hierarchy
- weight: constants/weight
- destination:
- plugin: entity:taxonomy_vocabulary