Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: MCP Sentinel 2.28.2 — Minor update available for module mcp_sentinel (2.28.2). Release: Rightup theme 1.0.2 — Minor update available for theme vartheme_bs5_rightup (1.0.2). Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage. Module Revived: Liquid Voting 2.0.1 — Module liquid_voting updated after 6 months of inactivity (2.0.1).

Dataflow

No security coverage
View on drupal.org

Dataflow is a realtime Drupal data sync/export/replication framework. The module allows building flexible data export flows (e.g. dataflows) to any destination, such as 3rd party API endpoints, external database, etc.

Quick Intro

Any entities created, updated or deleted in Drupal could be easily pushed to external endpoints in realtime.
One such example is pushing orders made at the website to the ERP (and further updates of their statuses).
The module is mainly intended to be used with API endpoints but other destinations could be used as well; as an example, there's a successful setup pushing business-critical data to remote MS SQL database with Dataflow.

Dataflow not only reacts to entity changes and pushes data, but also keeps track of what and where have been exported, stores remote objects IDs, tracks errors and periodically retries export in case of failures (such as if remote API returns an error or is temporarily unavailable).
The sync process normally happens at request shutdown so it doesn't affect page load time. In the worst case, if the sync failed, it would be retried on cron run.

Features

  • Flexible plugin-based setup.
  • Possibility to export same entities multiple times.
  • Entity references handling.
  • Exported items tracking.
  • Create, update and delete operations.
  • Failure tolerance.
  • Best effort (request shutdown) and cron based processing.
  • Migrate integration (for two-way sync).

Use Cases

The export (sync) is initiated by Drupal; any creation, deletion or updates made to tracked entities made in Drupal are automatically replicated to the data destination.
Possible usage scenarios:

  • Replicating orders made in Drupal to external ERP.
  • Syncing bookings, users registrations, form submissions, etc to CRM.
  • Exporting content to a different site (either Drupal or other systems).
  • Any other cases where data being input in Drupal needs to be sent externally.

Post-Installation

The module does not provide any UI; it is meant to be used programatically. The following steps should be done to start the dataflow:

  1. Implement Destination plugin (or use the existing one, like SQL destination); this is where you call your remote APIs.
  2. Implement Sync plugin for your entity type, define fields structure; this is where you provide data for your API..
  3. Add hook_entity_insert, hook_dataflow_entity_update and hook_dataflow_entity_delete hooks with delayedSync() to a custom module to make data flow.

There's a task to provide a usage example: #3372591: Usage example.

A few helper modules (e.g. providing different destination plugins) are available.

Similar projects

  • views_data_export provides batch data exporting, but is intended to be used periodically and export data to the file. In contrast, Dataflow pushes data changes in realtime.
  • webhooks allows reacting on entity create/update/delete and call remote APIs but does not allow tracking remote IDs and statuses of exported entities, retrying in case of failure etc.

πŸ‡ΊπŸ‡¦

This module is maintained by Ukrainian developers.
Please consider supporting Ukraine in a fight for their freedom and safety of Europe.

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
Jul 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.x-dev Dev Jul 5, 2023