Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Batch Import

Security covered Under active development 13 sites

Part of the Batch ecosystem · 8 projects

This module allows developers to import custom data in batches and queues, improving performance and scalability for large imports. It provides a framework for creating migration plugins, similar to Drupal core's Migrate module.

This module allows Drupal developers to run custom migrations in a batch/queue system by creating migration plugin classes. It is inspired by the Drupal core Migrate module. Queueing and batching are useful for migrations for the following reasons:

  • Batching allows large amounts of data to be processed in small chunks to reduce load on system memory. This allows for better performance and scalability.
  • Queueing allows tasks to be completed the next time cron runs. Similar to batching, this helps reduce the load on server resources. It will also run during cron, which can help with performance. Read more about cron for more info.

Getting Started

After installing the Batch Import module, a custom module should be created. Migration classes should be placed in /my_module/src/Plugin/batch_import/Migrations/ and extend the Drupal\batch_import\Plugin\BatchMigrationBase class. Class comments should follow plugin annotations for the BatchMigration plugin.

After creating a migration class, it will appear on the Batch Import form. This can be found by going to Content -> Batch Import Administration (/admin/content/batch-import).

Classes

  • BatchMigration - The base migration plugin. Runs a migration job. The source() and destination() methods should both be overridden.
  • BatchMigrationProcessor - Another plugin, useful for processing data in between source and destination. EntityMigrationProcessor is the most common, useful for preloading or creating entities before the destination method is run.
  • MigrationService - Not a plugin, but classes that extend MigrationServiceBase are useful for any code that is shared between migrations. Some will be automatically injected into migration class instances.

This module does require php programming, so it is recommended for intermediate to advanced developers. Read README file for more detailed instructions on usage.

Drupal 10–11

Ask your assistant about Batch Import

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Aug 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.0.0 Stable 10–11 Aug 29, 2024