Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

A Drupal module providing support for using database tables as migration sources, destinations and for data lookups.

Overview

This module provides a generic method to migrate data into, out of, and lookup from a database staging table. It's useful for complex migrations that need an intermediate staging area for data transformation and lookup.

Requirements

  • Drupal 9, Drupal 10 or Drupal 11
  • Migrate module (core)

Installation

composer require drupal/migrate_staging_table
drush en migrate_staging_table

Usage

Provided Plugins

Source Plugin: staging_table
Use a database table as a source for migrations.

source:
  plugin: staging_table
  table: my_staging_table
  fields:
    - id
    - field1
    - field2
  conditions:
    - column: status
      value: 1
      operator: '='

Destination Plugin: staging_table
Write migration data to a database table.

destination:
  plugin: staging_table
  table: my_staging_table
  fields:
    field1:
      type: varchar
      length: 255
    field2:
      type: text
    field3:
      type: int
  indexes:
    field1_index:
      - field1
  description: "My staging table for migration"

Process Plugin: staging_table_lookup
Lookup values from a staging table during migration.

process:
  field_destination:
    plugin: staging_table_lookup
    source: source_id
    table: my_staging_table
    field: field_to_retrieve

Configu

ration
Each plugin requires specific configuration parameters:

table: Name of the database table to use
fields: Field definitions for the table (for destination plugin) or field names to select (for source plugin)
conditions: (Source only) Optional conditions to filter source data

Notes

The module automatically manages the creation of tables for the destination plugin.
Each table automatically includes id and created fields
When a table already exists, the module will only add new fields, not modify existing ones.

Activity

Total releases
1
First release
Apr 2025
Latest release
11 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
2.0.0-alpha1 Pre-release Apr 24, 2025