⚒️ ETL Pipeline for Oracle

⚡ 0 views · ⚒️ Engineering

Description

Quick overview

A configurable ETL pipeline and data sync tool for Oracle database replication and data integration. On a schedule, it finds only the rows changed since the last run — an incremental sync — adjusts them if needed, and updates the target to match. It moves just the changes, not everything.

How it works

  1. Runs every 30 seconds on a schedule.
  2. Loads a configuration that defines the batch size and the list of source and target Oracle tables to sync.
  3. Splits the configuration into one item per table and reads the last saved watermark for each table from workflow static data.
  4. For each table, queries the Oracle Database for rows with a watermark column value greater than the saved watermark, ordered by the watermark and limited to the configured batch size.
  5. Builds an Oracle MERGE (upsert) SQL statement from the fetched rows and calculates the new maximum watermark from the returned data.
  6. Executes the MERGE against the target Oracle table to insert new rows and update existing rows by primary key.
  7. After a successful merge, stores the new per-table watermark in workflow static data and continues to the next table.

Setup

  1. Create and select an Oracle Database credential for the source and target connections (use two credentials if source and target are different databases).
  2. Update the table mapping in the configuration to match your environment (source table name, target table name, primary key column, and watermark column).
  3. Ensure each source table has a DATE/TIMESTAMP watermark column that is updated on changes and that the target tables exist with matching column names.
  4. Adjust the batch size and schedule interval as needed, then activate the workflow so the schedule trigger runs.

Requirements

Additional info

Instructions

Use Case

Note: This is polling-based, so latency roughly equals the schedule interval. Hard deletes in the source are not propagated (use a soft-delete flag column if you need them). The sync cursor is stored in workflow static data, which resets if the workflow is re-imported — for production, persist watermarks in a dedicated control table instead.

Nodes in Use

🔗 Nodes Used

Schedule Trigger, Oracle Database

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup