Postgres COPY icon

Postgres COPY

Execute PostgreSQL COPY commands for bulk operations

Copy From (Import)

AI-generated

Summary

Import data from a CSV, TSV, or custom-delimited binary file into a specified PostgreSQL table using the COPY FROM command.

Inputs

  • Table Name (required) — Specify the target table into which data will be imported.
  • Input Binary Field (required) — Set the name of the binary property that contains the file data to import.
  • Input Format (required) — Choose the format of the input file: CSV, TSV, or Custom Delimiter.
  • Custom Delimiter — Define a single character delimiter when 'Custom Delimiter' format is selected (default is '|').
  • Has Header Row — Indicate whether the first row of the file contains column names to be ignored during import.
  • Column Mapping — Map input file columns to specific target table columns in order. If specified, only mapped columns will be imported.
  • Options — Additional import options including Quote Character, Null String representation, Skip Errors (continue on individual row errors), and Dry Run mode (validate data without committing).

Output shape

a single record

Returns JSON confirming import success, target table, number of rows imported (not counted in implementation, thus zero), number of rows skipped (always zero), any errors (empty array), execution time (undefined), and dryRun flag. The operation errors if the specified table does not exist or if the binary data is missing.

Links

Discussion