Commit 88a16a40 authored by bdriesen's avatar bdriesen Committed by Bram Driesen
Browse files

Issue #3277640 by BramDriesen: Create migration for the sub municipalities

parent 174b0e3a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -15,12 +15,16 @@ source:
    - "Deelgemeente"
    - "Hoofdgemeente"
    - "Provincie"
  row_index_column: "Row index"
  keys:
    Hoofdgemeente:
      type: string
  constants:
    MIGRATION_NAME: "belgian_postal_code_main_municipalities"
destination:
  plugin: entity:taxonomy_term
  default_bundle: belgian_postal_code
  translations: false
process:
  name: "Hoofdgemeente"
  weight: "Row index"
+39 −0
Original line number Diff line number Diff line
id: belgian_postal_code_sub_municipalities
label: "Import Belgian Postal Code - Sub municipalities"
migration_group: Belgian Postal Code
migration_tags:
  - belgian_postal_code
source:
  plugin: spreadsheet
  file: "private://import/belgian_postal_codes_nl.xls"
  worksheet: "Plaatsnamen op postcode"
  origin: A2
  header_row: 1
  columns:
    - "Postcode"
    - "Plaatsnaam"
    - "Deelgemeente"
    - "Hoofdgemeente"
    - "Provincie"
  row_index_column: "Row index"
  keys:
    Plaatsnaam:
      type: string
  constants:
    MIGRATION_NAME: "belgian_postal_code_sub_municipalities"
    PARENT_MIGRATION_NAME: "belgian_postal_code_main_municipalities"
destination:
  plugin: entity:taxonomy_term
  default_bundle: belgian_postal_code
  translations: false
process:
  name: "Plaatsnaam"
  field_postal_code: "Postcode"
  weight: "Row index"
  parent:
    -
      plugin: callback
      callable: belgian_postal_code_destination_mapper
      source:
        - constants/PARENT_MIGRATION_NAME
        - Hoofdgemeente