Tuesday, June 25, 2019

Migration path info for drupal 8

if the path of your csv file is in the root of your project then:
source:

  plugin: CSV

  path: your_file.csv
the best practice is to put the csv file into your migrate module in a directory "artifacts" for example the structure should be as below:
-- custom_migrate_module

   +-- artifacts

         +-- your_file.csv

   +-- config

   +-- src

   +-- custom_migrate_module.info.yml
in this case your migration confg file should be:
source:

  plugin: CSV

  path: modules/custom/custom_migrate_module/artifacts/your_file.csv

No comments:

Post a Comment