Generic DB Importer icon

Generic DB Importer

Import data to MySQL database with field mapping and deduplication

Generic DB Importer

AI-generated

Summary

Import data into a specified MySQL database table with options for full or incremental imports, supporting field mapping, batch processing, and duplicate handling based on unique keys.

Inputs

  • Import Mode (required) — Choose between 'Full Import' to clear the target table before importing all data, or 'Incremental Import' to insert only new records based on unique key fields.
  • Target Table (required) — Name of the database table to import into; supports 'database.table' format.
  • Batch Size — Number of records to process in each batch, ranging from 100 to 10,000 (default 5000).
  • Import Fields (required) — Comma-separated list of fields to import with exact field names to map data from input to database columns.
  • Unique Key Fields — Comma-separated list of target table fields used as unique keys to identify duplicates; required for incremental imports.
  • Options — Collection of additional options: 'Truncate Table Before Import' (boolean, defaults to true for full imports), 'Continue on Error' (boolean, whether to proceed if a batch fails), and 'Verify Import Count' (boolean, to verify the number of imported records matches source data).

Output shape

a single JSON object with import statistics and status after processing all input data sets

The output JSON includes fields like 'success', 'totalRows', 'importedRows', 'duplicateRows', 'failedRows', and a detailed message. If the node fails on errors without 'Continue on Error' enabled, it will throw an error instead. The node processes input data arrays where the first row is treated as headers and subsequent rows as data. Batch import and duplicate detection are optimized internally. The node requires valid MySQL credentials and throws errors if required parameters are missing or data is invalid.

Discussion