started custom migration module migrate_leshed
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
- migrate_google_sheets
|
||||
- migrate_plus
|
||||
id: projet_node
|
||||
label: 'Import des projets depuis Google Sheets'
|
||||
migration_group: le_shed
|
||||
source:
|
||||
plugin: projet_node
|
||||
data_fetcher_plugin: http
|
||||
data_parser_plugin: google_sheets
|
||||
# The feed file for the spreadsheet. The Google Spreadsheet should be either “Public” or set to “Anyone with link can
|
||||
# view” in order for the feed to work.
|
||||
# Template: 'https://sheets.googleapis.com/v4/spreadsheets/<SHEET>/values/<TAB>?key=<KEY>'
|
||||
urls: 'https://sheets.googleapis.com/v4/spreadsheets/1561Gv1C-IlCTmg64Z8HnznvOeLbvwhA_k1l6aq95zFA/values/Projets?key=AIzaSyBOzRmGI0voXH7Ly8eva3PmphdzGuaNKsc'
|
||||
# Under 'fields', we list the data items to be imported. The first level keys
|
||||
# are the source field names we want to populate (the names to be used as
|
||||
# sources in the process configuration below). For each field we're importing,
|
||||
# we provide a label (optional - this is for display in migration tools) and
|
||||
# an selector (xpath) for retrieving that value. It's important to note that this xpath
|
||||
# is relative to the elements retrieved by item_selector.
|
||||
# For Google Spreadsheet XML feeds the actual columns are named with gsx: followed by the cleaned column name (lower,
|
||||
# limited punctuation, etc).destination:
|
||||
fields:
|
||||
-
|
||||
name: id
|
||||
label: 'Unique identifier'
|
||||
selector: 'UID'
|
||||
-
|
||||
name: title
|
||||
label: 'Title'
|
||||
selector: 'Nom du projet'
|
||||
-
|
||||
name: date_start
|
||||
label: 'Date start'
|
||||
selector: 'Date de début de projet'
|
||||
-
|
||||
name: date_end
|
||||
label: 'Date end'
|
||||
selector: 'Date de fin de projet'
|
||||
-
|
||||
name: projet_type
|
||||
label: 'Type de projet'
|
||||
selector: 'Type de projet'
|
||||
# Under 'ids', we identify source fields populated above which will uniquely
|
||||
# identify each imported item. The 'type' makes sure the migration map table
|
||||
# uses the proper schema type for stored the IDs.
|
||||
ids:
|
||||
id:
|
||||
type: integer
|
||||
process:
|
||||
type:
|
||||
plugin: default_value
|
||||
default_value: projet
|
||||
title: title
|
||||
field_dates/value:
|
||||
plugin: format_date
|
||||
source: date_start
|
||||
from_format: 'd/m/Y'
|
||||
to_format: 'Y-m-d'
|
||||
field_dates/end_value:
|
||||
plugin: format_date
|
||||
source: date_end
|
||||
from_format: 'd/m/Y'
|
||||
to_format: 'Y-m-d'
|
||||
field_type_de_projet:
|
||||
|
||||
uid:
|
||||
plugin: default_value
|
||||
default_value: 3
|
||||
migration_dependencies: { }
|
||||
|
||||
destination:
|
||||
plugin: entity:node
|
||||
@@ -0,0 +1,8 @@
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: le_shed
|
||||
label: 'Le shed'
|
||||
description: ''
|
||||
source_type: 'google doc sheets'
|
||||
module: null
|
||||
shared_configuration: null
|
||||
Reference in New Issue
Block a user