Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module allows you to use database tables as a staging area for data migration. It provides plugins to use these tables as sources for importing data, destinations for exporting data, and for looking up values during the migration process.

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
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

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