This project is not covered by Drupal’s security advisory policy.

When processing lists of data, the migration system has very specific ideas of what’s considered “empty” or not: zero = false, empty string, and NULL, which of these means ”empty”? Drupal has a “skip_on_empty” migration process plugin, but it may not give the desired result if you don’t know what you’re doing. This module provides a few different mechanisms to define what is “empty” and should be skipped.

See the README for more details.

Requirements

  • Drupal 8 or 9

Usage

This module provides the following alternatives:

  • skip_on_empty_value: It's like skip_on_empty, but uses empty($value) instead, allowing it to work on FALSE, empty strings, and empty arrays.
  • skip_on_empty_array: Is a special case of skip_on_empty, but allows the array to be populated with values considered empty by the empty() function.

Use like the skip_on_empty process plugin:

  field_title:
    -
      plugin: skip_on_empty_value
      method: row
  field_body:
    -
      plugin: skip_on_empty_array
      method: process

This Module is Part of a Migration Framework

This module is part of a migration framework created for a client project in which we migrated information from Digital Measures to a Drupal site. However, the specific problems each module solves are common to migration processes in general. With the exception of Digitalmeasures Migrate, these modules are fairly generic and can be used for a variety of other migrations.

For more information on how this framework was used for a Digital Measure Migration, read:

Here are the modules in the migration framework:

  • Digitalmeasures Migrate
    Provides a method to access Digital Measures API through Drupal.
  • Migrate Process XML
    Reads XML and allows you to extract particular key sections using XPath.
  • Migrate Process S3
    Allows you to download objects from an S3 bucket as files to your Drupal site.
  • Migrate Process URL
    Allows you to manipulate URL values that are provided within the data.
  • Migrate Process Regex
    Provides a way to use Regular Expressions in a Drupal migration.
  • Migrate Process Vardump
    Often used for debugging, this module takes any data given to it and dumps it to the terminal output and then passes it on.
  • Migrate Process Skip
    Provides a few different mechanisms to define what is “empty” and should be skipped.
  • Migrate Process Trim
    This module provides a quick and simple means to remove leading or trailing characters (such as spaces) in a Drupal migration.
  • Migrate Process Array
    Provides utilities for interacting with arrays during migration.
Supporting organizations: 
Development time

Project information

Releases