Skip to content

Instantly share code, notes, and snippets.

@davidjguru
Created March 20, 2020 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidjguru/90705e44ff984f6268374ea37e0db621 to your computer and use it in GitHub Desktop.
Save davidjguru/90705e44ff984f6268374ea37e0db621 to your computer and use it in GitHub Desktop.
Drupal Migrations: Basic Migration descript file for a CSV file as datasource.
uuid: 1bcec3e7-0a49-4473-87a2-6dca09b91aba
langcode: en
status: true
dependencies: { }
id: article_csv_import
label: 'Migrating articles'
source:
plugin: csv
path: modules/custom/migration_csv_module/csv/migration_csv_articles.csv
delimiter: ','
enclosure: '"'
header_offset: 0
ids:
- id
fields:
-
name: id
label: 'Unique Id'
-
name: title
label: Title
-
name: body
label: 'Post Body'
-
name: tags
label: 'Taxonomy Tag'
-
name: image
label: 'Image Field'
process:
title: title
body: body
tags: field_tags
image: field_image
type:
plugin: default_value
default_value: article
destination:
plugin: 'entity:node'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment