XML Source Won't import without a Source ID I'm using Drupal 8's Migrate API to pull in an RSS Feed as Nodes. The simple_xml data parser seems to require a Unique ID for the import or else I get an error on import.

The XML data is coming from the internet and only has one field applicable as a unique id, however it is preceded by a URL. I process the field with the substr plugin in order to pull in the ID, but when I run the import I get the following error message :

Migration failed with source plugin exception: field_guid has no value


The YAML file includes the following:

  source:
    plugin: migrate_gitem_xml
    data_fetcher_plugin: file
    data_parser_plugin: simple_xml
    urls:
      - www.somesite.com/source/xml-source.xml
  item_selector: '/rss/channel/item'
  ids:
    field_guid:
      type: integer
   fields:
    -
      name: title
      label: 'Title of the Item'
      selector: title
    -
      name: link
      label: 'Link to the Item'
      selector: link
    -
      name: body
      label: 'Body'
      selector: &gt;
        content:encoded
    -
      name: guid
      label: 'ID of the Item'
      selector: guid
  process:
    type:
      plugin: default_value
      default_value: content_type
    uid:
    -
      plugin: default_value
      default_value: 1
    title: title
    field_link: link
    body/value: body
    body/format:
    plugin: default_value
    default_value: basic_html
    changed: '@created'
    field_guid:
    -
      plugin: substr
      source: guid
      start: 61
      length: 6


Any insight on how to get the Migration to work?
field_guid doesn't exist until the process pipeline runs, which is too late to use as a source ID. You can either simply use guid itself as your ID (with type: string), or do the truncation in prepareRow().