Plug Database icon

Plug Database

Run Plug Database commands over REST or Socket.

SQL → Bulk Insert SQL

AI-generated

Summary

Insert multiple rows into a SQL table using Plug’s sql.bulkInsert command. In Guided mode, provide the target table, column definitions, and row arrays; Advanced mode accepts a raw JSON-RPC command.

Inputs

  • Channel — Choose REST (default) or Socket transport.
  • Input Mode — Guided (default) builds the bulk insert command from the table, columns, and rows. Advanced sends a raw JSON-RPC command, which must use the operation’s expected method.
  • Table (required) — Target table name, such as dbo.MyTable (Guided mode).
  • Columns JSON (required) — JSON array of column definitions with name and type, and optional nullable and max_len fields (Guided mode).
  • Rows JSON (required) — JSON array of row arrays. Each row must have the same number of values as the columns array (Guided mode).
  • Raw JSON-RPC Command (required) — A JSON-RPC command object to send in Advanced mode. The node validates the command for this operation and injects the resolved client token where supported.
  • Agent ID — Override the target agent; otherwise uses the credential’s Default Agent ID.
  • Client Token — Override the client token; otherwise uses the credential’s Default Client Token.
  • Response Mode — Choose aggregated JSON (default), one item with rowCount and rows[], chunk items where supported by a socket stream, or the normalized raw JSON-RPC envelope.
  • Include Plug Metadata — Include a __plug object with channel, agent, request, and socket metadata in the output; defaults to true.
  • Additional Options — Guided-mode options include timeout (default 15000 ms), API version (default 2.8), optional RPC metadata JSON, a server timings request, and maximum parallel input items (0 means sequential).
  • Socket Options — Socket transport options include local stream buffer limits, stream pull window size, relay fast path, and a server timings request.

Output shape

One or more n8n items containing the normalized SQL command response.

The selected response mode affects output formatting. Aggregated JSON emits SQL rows as items when possible and otherwise one JSON item; Aggregated Single Item emits one item with rowCount and rows[]; Chunk Items applies to socket stream chunks and other combinations fall back to aggregated output; Raw JSON-RPC returns the normalized RPC envelope. The source pack’s method bodies are omitted, so the precise bulk-insert response fields are not established here.

Links

Discussion