-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release(2.17.0): add demo_finanziamento ouitoulia/diagraphe#15
- Loading branch information
Showing
1 changed file
with
239 additions
and
0 deletions.
There are no files selected for viewing
239 changes: 239 additions & 0 deletions
239
config/install/migrate_plus.migration.demo_finanziamento.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,239 @@ | ||
id: demo_finanziamento | ||
label: Tipo di contenuto Finanziamento | ||
migration_group: scuola_demo | ||
migration_tags: | ||
- json | ||
- scuola | ||
- demo | ||
- demo_node | ||
- demo_finanziamento | ||
|
||
source: | ||
plugin: url | ||
data_fetcher_plugin: http | ||
data_parser_plugin: json | ||
|
||
headers: | ||
Accept: 'application/json; charset=utf-8' | ||
Content-Type: 'application/json' | ||
|
||
# The data_parser normally limits the fields passed on to the source plugin | ||
# to fields configured to be used as part of the migration. To support more | ||
# dynamic migrations, the JSON data parser supports including the original | ||
# data for the current row. Simply include the 'include_raw_data' flag set | ||
# to `true` to enable this. This option is disabled by default to minimize | ||
# memory footprint for migrations that do not need this capability. | ||
# include_raw_data: false | ||
|
||
# Flags whether to track changes to incoming data. If TRUE, we will maintain | ||
# hashed source rows to determine whether incoming data has changed. | ||
# track_changes: false | ||
|
||
urls: | ||
- 'https://ouitoulia.github.io/krene/demo/finanziamento.json' | ||
|
||
# An xpath-like selector corresponding to the items to be imported. | ||
item_selector: data | ||
|
||
fields: | ||
- name: nid | ||
label: 'ID del nodo' | ||
selector: id | ||
- name: type | ||
label: 'Il tipo di contenuto' | ||
selector: type | ||
- name: title | ||
label: 'Il titolo del contenuto' | ||
selector: attributes/titolo | ||
|
||
# Scheda "Apertura" | ||
- name: abstract | ||
label: 'Descrizione breve' | ||
selector: attributes/abstract | ||
- name: argomenti | ||
label: 'Argomenti' | ||
selector: relationships/argomenti/data | ||
- name: codice_cup | ||
label: "Il codice CUP" | ||
selector: attributes/codice_cup | ||
- name: importo_finanziamento | ||
label: "Importo finanziato" | ||
selector: attributes/importo_finanziamento | ||
- name: stato_progetto | ||
label: "Stato del progetto" | ||
selector: relationships/stato_progetto/data/id | ||
- name: copertina | ||
label: 'Immagine di copertina' | ||
selector: relationships/copertina/data/id | ||
|
||
# Scheda "Descrizione" | ||
- name: descrizione | ||
label: 'Descrizione e scopo' | ||
selector: attributes/descrizione | ||
- name: link | ||
label: "Riferimenti normativi" | ||
selector: attributes/link | ||
|
||
# Scheda "Date e tempi" | ||
- name: data_ora_inizio | ||
label: "Data di inizio" | ||
selector: attributes/data_ora_inizio | ||
- name: data_ora_fine | ||
label: "Data di fine" | ||
selector: attributes/data_ora_fine | ||
|
||
# Scheda "Contatti" | ||
- name: struttura_responsabile | ||
label: 'Struttura responsabile' | ||
selector: relationships/struttura_responsabile/data | ||
- name: persona_responsabile | ||
label: 'La persona responsabile della struttura organizzativa' | ||
selector: relationships/persona_responsabile/data | ||
- name: persone | ||
label: 'Le persone' | ||
selector: relationships/persone/data | ||
- name: persone_esterne | ||
label: 'Altri componenti' | ||
selector: attributes/persone_esterne | ||
- name: collaborazioni | ||
label: 'Collaborazioni con altri enti, associazioni, ecc' | ||
selector: relationships/collaborazioni/data | ||
|
||
# Footer | ||
- name: language | ||
label: 'La lingua del contenuto' | ||
selector: attributes/language | ||
- name: promote | ||
label: 'Se il contenuto è promosso alla prima pagina' | ||
selector: attributes/promote | ||
- name: sticky | ||
label: 'Se il contenuto è in cima agli elenchi' | ||
selector: attributes/sticky | ||
- name: published | ||
label: 'Se il contenuto è pubblicato o meno' | ||
selector: attributes/published | ||
|
||
ids: | ||
nid: | ||
type: integer | ||
|
||
process: | ||
nid: nid | ||
uid: | ||
plugin: default_value | ||
default_value: 1 | ||
type: type | ||
title: title | ||
|
||
# Scheda "Apertura" | ||
field_abstract: abstract | ||
field_argomenti: | ||
- plugin: skip_on_empty | ||
source: argomenti | ||
method: process | ||
- plugin: sub_process | ||
source: argomenti | ||
process: | ||
target_id: id | ||
field_codice_cup: codice_cup | ||
field_importo_finanziamento: importo_finanziamento | ||
field_stato_progetto: stato_progetto | ||
field_copertina: | ||
plugin: skip_on_empty | ||
source: copertina | ||
method: process | ||
|
||
# Scheda "Descrizione" | ||
body/value: descrizione | ||
body/format: | ||
- plugin: default_value | ||
default_value: bootstrap_italia_2 | ||
field_link: | ||
plugin: skip_on_empty | ||
source: link | ||
method: process | ||
|
||
# Scheda "Date e tempi" | ||
field_data_inizio: | ||
plugin: skip_on_empty | ||
source: data_ora_inizio | ||
method: process | ||
field_data_fine: | ||
plugin: skip_on_empty | ||
source: data_ora_fine | ||
method: process | ||
|
||
# Scheda "Contatti" | ||
field_struttura_responsabile: | ||
- plugin: skip_on_empty | ||
source: struttura_responsabile | ||
method: process | ||
- plugin: sub_process | ||
source: struttura_responsabile | ||
process: | ||
target_id: id | ||
field_persona_responsabile: | ||
- plugin: skip_on_empty | ||
source: persona_responsabile | ||
method: process | ||
- plugin: sub_process | ||
source: persona_responsabile | ||
process: | ||
target_id: id | ||
field_persone: | ||
- plugin: skip_on_empty | ||
source: persone | ||
method: process | ||
- plugin: sub_process | ||
source: persone | ||
process: | ||
target_id: id | ||
field_persone_esterne: | ||
plugin: skip_on_empty | ||
source: persone_esterne | ||
method: process | ||
field_collaborazioni: | ||
- plugin: skip_on_empty | ||
source: collaborazioni | ||
method: process | ||
- plugin: sub_process | ||
source: collaborazioni | ||
process: | ||
target_id: id | ||
|
||
# Footer | ||
langcode: | ||
plugin: default_value | ||
source: language | ||
default_value: "und" | ||
promote: | ||
plugin: default_value | ||
source: promote | ||
default_value: 0 | ||
sticky: | ||
plugin: default_value | ||
source: sticky | ||
default_value: 0 | ||
status: | ||
plugin: default_value | ||
source: published | ||
default_value: 0 | ||
|
||
destination: | ||
plugin: entity:node | ||
default_bundle: finanziamento | ||
translations: true | ||
|
||
migration_dependencies: | ||
required: | ||
- demo_taxonomy | ||
- demo_media | ||
- demo_persona | ||
- demo_struttura_organizzativa | ||
- demo_partner | ||
|
||
dependencies: | ||
enforced: | ||
module: | ||
- sunchronizo | ||
|