content migration - csv to drupal 8
TRANSCRIPT
![Page 1: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/1.jpg)
Content Migration: CSV to Drupal 8
Hector Iribarne @hectoriribarneTrack: Development & Performance
Level: Intermediate
![Page 2: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/2.jpg)
@hectoriribarne
Hector Iribarne (iribarne.com)
Drupal Site Builder & Developer (since 2007)
Broward Drupal co-founder
iribarne on Drupal.org and IRC
Contributed Contentin and Contentout modules (D7 sandbox modules)
#FLDC16
![Page 3: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/3.jpg)
#FLDC16@hectoriribarne
Main Topics Demo migrating content into D8 from a CSV file
Demo migrating users into D8 from a CSV file
Let’s look at some D8 code!
![Page 4: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/4.jpg)
Basics:
Migrating Content CSV into Drupal 8
@hectoriribarne #FLDC16
![Page 5: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/5.jpg)
@hectoriribarne #FLDC16
Drupal 8 - Migrating from a CSV source - Basics :
● Drupal 8 contrib migrate modules:○ Migrate Plus ○ Migrate Tools○ Migrate Source CSV
● Great example (reference for this presentation) on migrating content into Drupal 8 from Lucas Hedding, the maintainer of the Migrate Source CSV module: https://github.com/heddn/d8_custom_migrate
![Page 6: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/6.jpg)
@hectoriribarne
DB from Site 1(D7)
CSV file (users)[(h)header,(c)content]
Site 2(D8)
Site 1(D7)
CSV to Drupal 8 Content/User Migration:
Contentout(One-click to
generate CSV file from Site 1)
d8_migr8_csv2pages
1
2
Legend:(h) header(c) contentSandbox moduleCustom modules Demo number
#FLDC16
Presentation in one slide 1
hccc
CSV file (pages)[(h)header,(c)content]
hccc
migr8_users
SQL query(generate CSV file
from Site 1 DB)
SELECT FROMWHERE
![Page 7: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/7.jpg)
Demo 1:
CSV content
into D8
@hectoriribarne #FLDC16
![Page 8: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/8.jpg)
Demo 2:
CSV users
into D8
@hectoriribarne #FLDC16
![Page 9: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/9.jpg)
What we covered in
both demos
@hectoriribarne #FLDC16
![Page 10: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/10.jpg)
@hectoriribarne #FLDC16
Drupal 7 content to export:
![Page 11: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/11.jpg)
@hectoriribarne #FLDC16
Create CSV file in Drupal 7 using Contentout:
![Page 12: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/12.jpg)
@hectoriribarne #FLDC16
Pages.csv file:
![Page 13: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/13.jpg)
@hectoriribarne #FLDC16
Import CSV content into Drupal 8:
![Page 14: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/14.jpg)
@hectoriribarne #FLDC16
Voila! Content migrated to D8:
![Page 15: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/15.jpg)
@hectoriribarne #FLDC16
Drupal 7 users to export:
![Page 16: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/16.jpg)
@hectoriribarne #FLDC16
SQL query for users:
![Page 17: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/17.jpg)
@hectoriribarne #FLDC16
qb_users.csv file:
![Page 18: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/18.jpg)
@hectoriribarne #FLDC16
Import CSV users into Drupal 8:
![Page 19: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/19.jpg)
@hectoriribarne #FLDC16
Voila! Users migrated to D8:
![Page 20: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/20.jpg)
Let’s look at some code!!!
@hectoriribarne #FLDC16
![Page 21: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/21.jpg)
@hectoriribarne #FLDC16
Links:
● Code/files: CSV to D8 Migration○ http://browarddrupal.org/PastMeetings/february-2016
● Contentout sandbox module○ https://www.drupal.org/sandbox/iribarne/2461613
○ git clone --branch 7.x-1.x http://git.drupal.org/sandbox/iribarne/2461613.git contentout
● Content Migration: CSV to Drupal 7○ http://www.slideshare.net/hectoriribarne/drupal-camp-atlanta-2015-no-code-content-
migration
![Page 22: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/22.jpg)
Questions?
Hector Iribarne @hectoriribarne
![Page 23: Content migration - CSV to Drupal 8](https://reader030.vdocuments.mx/reader030/viewer/2022020719/587cc6dc1a28abfa018b5407/html5/thumbnails/23.jpg)
http://browarddrupal.org/contact
If you liked my presentation, follow me on Twitter: @hectoriribarne
Go Fish:Details:
HectorIribarne
d.o. username: iribarne
http://certifiedtorock.com/u/192646
#FLDC16