content migration - csv to drupal 8

Post on 16-Jan-2017

1.969 Views

Category:

Software

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Content Migration: CSV to Drupal 8

Hector Iribarne @hectoriribarneTrack: Development & Performance

Level: Intermediate

@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

#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!

Basics:

Migrating Content CSV into Drupal 8

@hectoriribarne #FLDC16

@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

@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

Demo 1:

CSV content

into D8

@hectoriribarne #FLDC16

Demo 2:

CSV users

into D8

@hectoriribarne #FLDC16

What we covered in

both demos

@hectoriribarne #FLDC16

@hectoriribarne #FLDC16

Drupal 7 content to export:

@hectoriribarne #FLDC16

Create CSV file in Drupal 7 using Contentout:

@hectoriribarne #FLDC16

Pages.csv file:

@hectoriribarne #FLDC16

Import CSV content into Drupal 8:

@hectoriribarne #FLDC16

Voila! Content migrated to D8:

@hectoriribarne #FLDC16

Drupal 7 users to export:

@hectoriribarne #FLDC16

SQL query for users:

@hectoriribarne #FLDC16

qb_users.csv file:

@hectoriribarne #FLDC16

Import CSV users into Drupal 8:

@hectoriribarne #FLDC16

Voila! Users migrated to D8:

Let’s look at some code!!!

@hectoriribarne #FLDC16

@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

Questions?

Hector Iribarne @hectoriribarne

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

top related