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
- Each parameter expression is evaluated and passed to the statement as
$1,$2, ... or as the arguments of the Redis command. - SQL runs as a single
SELECT(orWITH ... SELECT) inside a read-only transaction, with a timeout and a row cap. Redis only accepts read commands such asGET,HGETALLorSISMEMBER. - The result is stored: one row (or
null) infirstmode, the list of rows inallmode.
Ports
| Port | Taken when |
|---|---|
Success | The read succeeded. |
Error | The 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
| Field | What it does |
|---|---|
| Name | Label shown on the canvas and in the trace. |
| Connection | A Postgres or Redis connection from Settings, Integrations. |
| Statement or command | The SQL with placeholders, or the Redis command. |
| Parameters | One expression per placeholder, in order. |
| Mode and max rows | SQL only: first or all, and the row cap. |
| Store result in | The variable that receives the result. |
| Timeout and on error | fail 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_URLfor 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.