Skip to main content

Execute Non Query

Executes a PostgreSQL non-query SQL statement (INSERT, UPDATE, DELETE, etc.).

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Connection Id - The unique identifier of the database connection to use.
  • Transaction Id - The unique identifier of the transaction (optional).
  • SQL Query - The SQL statement to execute (can include template variables).

Options

  • None

Output

  • None

How It Works

The Execute Non Query node executes a PostgreSQL non-query SQL statement using the provided parameters. When executed, the node:

  1. Validates the provided connection ID and retrieves the connection
  2. Optionally retrieves the transaction if a transaction ID is provided
  3. Processes template variables in the SQL query using the message context
  4. Creates and executes the SQL command

Requirements

  • A valid PostgreSQL connection must be established
  • The SQL query must be valid
  • If using transactions, a valid transaction ID must be provided

Error Handling

The node will return specific errors in the following cases:

  • Connection Id not found in the connections dictionary
  • Transaction Id not found in the transactions dictionary

Usage Notes

  • The SQL Query input supports template variables using double curly braces (e.g., {{variableName}})
  • Template variables are populated from the message context
  • Non-query statements include INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, etc.
  • When using transactions, the transaction must be committed using the Commit Transaction node
  • The SQL editor provides syntax highlighting for SQL statements