decision control
Nodes

Query

Reads from a Postgres or Redis connection, read-only.

The Query node reads directly from a connection of your project, either a Postgres database or a Redis, without a service in between. It can only read.

When to use it

  • Check a customer record or a limit stored in your own database.
  • Read a flag, counter or set from Redis.

How it works

  1. Each parameter expression is evaluated and passed to the statement as $1, $2, ... or as the arguments of the Redis command.
  2. SQL runs as a single SELECT (or WITH ... SELECT) inside a read-only transaction, with a timeout and a row cap. Redis only accepts read commands such as GET, HGETALL or SISMEMBER.
  3. The result is stored: one row (or null) in first mode, the list of rows in all mode.

Ports

PortTaken when
SuccessThe read succeeded.
ErrorThe call failed and the node is set to continue with a fallback. If Error is not connected, the run carries on through Success with the fallback in place.

Configuration

FieldWhat it does
NameLabel shown on the canvas and in the trace.
ConnectionA Postgres or Redis connection from Settings, Integrations.
Statement or commandThe SQL with placeholders, or the Redis command.
ParametersOne expression per placeholder, in order.
Mode and max rowsSQL only: first or all, and the row cap.
Store result inThe variable that receives the result.
Timeout and on errorfail stops the run; continue writes a fallback.

What it writes

The result under your variable (vars.customer.status). The trace shows the statement summary and the row count, never the secrets.

In a real flow

The customer status is read from Postgres. An active customer goes on; if the read fails, the run falls back to manual review.

When it fails

  • The read fails or times out: UPSTREAM_FAILED (BLOCKED_URL for a blocked address), unless on-error continues with a fallback.
  • A parameter cannot be computed: EXPRESSION_FAILED.
  • Checks refuses a statement that is not a single SELECT, a wrong number of parameters, or a Redis command with no key.

Good to know

  • Use a read-only database user as well. The database refuses writes, and so should the account.

On this page