-
-
Save rakeshjames/fe016249441734637ebd0e772e78687a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: migrate_csv_users | |
label: 'Migrate users from the csv file' | |
migration_group: migration | |
source: | |
plugin: csv | |
# Full path to the file. | |
path: '/Library/WebServer/Documents/d8migrate.local/modules/custom/migrate_csv/assets/csv/migrate_csv_users.csv' | |
header_row_count: 1 | |
keys: | |
- ID | |
# Adding constant value. | |
constants: | |
status: 1 | |
process: | |
# Adding the mapping between the fields and the csv columns. | |
name: Name | |
mail: Email | |
roles: | |
plugin: explode | |
delimiter: ',' | |
source: Roles | |
field_first_name: Firstname | |
field_last_name: Lastname | |
status: constants/status | |
# migrating the the password in plain texts. | |
pass: | |
plugin: callback | |
callable: md5 | |
source: Password | |
destination: | |
plugin: 'entity:user' | |
md5_passwords: true | |
migration_dependencies: | |
required: { } | |
optional: { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment