Actions26
- SQL Actions
- Client Access Actions
- User Access Actions
- Tools Actions
SQL → Execute Batch
AI-generatedSummary
Execute a batch of SQL commands against a Plug database agent either over REST or socket channels, supporting guided or advanced JSON-RPC input modes.
Inputs
- Channel — Choose whether the SQL batch commands are executed over the REST API or the Plug consumer socket.
- Input Mode (required) — Select 'Guided' to specify SQL batch commands as a JSON array with optional parameters and execution order. Select 'Advanced' to provide a full JSON-RPC command object directly.
- Batch Commands JSON (required) — In Guided mode, provide a JSON array of batch command objects, where each object can include the SQL statement, parameters, and execution order.
- Raw JSON-RPC Command (required) — In Advanced mode, input a single JSON-RPC command object for batch execution; the client token is injected automatically.
- Response Mode — Determine how the response is returned: as aggregated JSON (default), chunk items (streamed socket output), or raw JSON-RPC envelope.
- Agent ID — Optionally override the target Plug agent; defaults to the agent specified in credentials.
- Client Token — Optionally override the Plug client token; defaults to the token in credentials.
- Include Plug Metadata — Include metadata about the Plug request, such as channel, agent, and socket info, in the output.
- Additional Options — Extra parameters including execution timeout, API version override, custom meta JSON, max rows limit, transaction flag to run the batch atomically, target database/schema, and an idempotency key.
- Socket Options — When running over the socket channel, options for local buffering limits and stream pull window size.
Output shape
a list of items representing the results of the batch SQL execution or aggregated JSON; can also return chunked items for streaming or raw JSON-RPC envelopes based on response mode.
The output structure depends on the response mode chosen. Aggregated JSON returns rows as individual items when applicable, chunk items mode streams socket SQL output, and raw JSON-RPC mode returns the full normalized RPC response for debugging or advanced use. Plug metadata is optionally included in outputs.