safetypin

Custom D8 Migration

Nov 17th, 2017
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.62 KB | None | 0 0
  1. uuid: 01b206d9-ce4c-40ff-a946-f4e8b00dd3d6
  2. langcode: en
  3. status: true
  4. dependencies: {  }
  5. id: upgrade_d7_node_crime_report
  6. class: Drupal\migrate\Plugin\Migration
  7. field_plugin_method: null
  8. cck_plugin_method: null
  9. migration_tags:
  10.  - 'Drupal 7'
  11. migration_group: migrate_drupal_7
  12. label: 'Nodes (Crime Report)'
  13. source:
  14.   plugin: d7_node
  15.   node_type: crime_report
  16. process:
  17.   nid: tnid
  18.   vid: vid
  19.   langcode:
  20.     plugin: default_value
  21.     source: language
  22.     default_value: und
  23.   title: title
  24.   uid: node_uid
  25.   status: status
  26.   created: created
  27.   changed: changed
  28.   promote: promote
  29.   sticky: sticky
  30.   revision_uid: revision_uid
  31.   revision_log: log
  32.   revision_timestamp: timestamp
  33.   comment_node_crime_report/0/status: comment
  34.   field_date_reported:
  35.     plugin: iterator
  36.     source: field_date_reported
  37.     process:
  38.       value:
  39.         plugin: format_date
  40.         from_format: 'Y-m-d H:i:s'
  41.         to_format: 'Y-m-d\TH:i:s'
  42.         source: value
  43.   field_date_occurred:
  44.     plugin: iterator
  45.     source: field_date_occurred
  46.     process:
  47.       value:
  48.         plugin: format_date
  49.         from_format: 'Y-m-d H:i:s'
  50.         to_format: 'Y-m-d\TH:i:s'
  51.         source: value
  52.   field_crime_location:
  53.     plugin: get
  54.     source: field_location
  55.     destination: field_crime_location
  56.   field_description:
  57.     plugin: get
  58.     source: field_description
  59.   field_disposition:
  60.     plugin: get
  61.     source: field_disposition
  62.   field_crime:
  63.     plugin: get
  64.     source: field_crime
  65. destination:
  66.   plugin: 'entity:node'
  67.   default_bundle: crime_report
  68. migration_dependencies:
  69.   optional:
  70.    - upgrade_d7_field_instance
Advertisement
Add Comment
Please, Sign In to add comment