Adapter: SQL database
Query, write to and poll a PostgreSQL, SQL Server, MySQL or Oracle database with bound parameters.
Purpose
Poll rows from, write rows to and look up values in a PostgreSQL, SQL Server, MySQL (or MariaDB) or Oracle database, with parameterized statements.
Auth
- A database user and password, over TLS (
verify-fullby default).
Settings
Auth is no selector; the secret settings below are the credentials. Dotted names are fields inside an object setting. Secret settings are encrypted at rest, never returned by a read, and shown masked in the console and in exports; their defaults are not shown.
| Setting | Type | Required | Default | Secret | Description |
|---|---|---|---|---|---|
dialect | enum: postgres, sqlserver, mysql, oracle | No | postgres | No | Database engine: postgres (PostgreSQL), sqlserver (SQL Server), mysql (MySQL or MariaDB) or oracle (Oracle, thin mode). |
host | string | Yes | No | Host. | |
port | number | No | No | Port (default 5432 PostgreSQL, 1433 SQL Server, 3306 MySQL, 1521 Oracle). | |
database | string | Yes | No | Database name (Oracle: the service name, or the SID). | |
oracleSid | boolean | No | No | Oracle only: the database name is a SID, not a service name. | |
user | string | Yes | No | User. | |
password | string | Yes | Yes | Password. | |
tls | object | No | {"mode":"verify-full"} | TLS. | |
tls.mode | enum: verify-full, require, disable | No | verify-full | No | TLS: verify-full checks the certificate and host name; require encrypts without checking the certificate (Oracle still checks its chain); disable only for an allowlisted private host. |
tls.serverCertDn | string | No | No | Oracle only: the server certificate's subject DN that verify-full matches (default CN=<host>). | |
tls.caPem | string | No | Yes | CA certificate (PEM) the server certificate must chain to (not Oracle: use NODE_EXTRA_CA_CERTS). | |
poolSize | number | No | 5 | No | Connections kept open at most. |
statementTimeoutMs | number | No | 30000 | No | Statement timeout in milliseconds. |
Actions
A trailing ? marks an optional step parameter. A message can supply only the keys in the last column; everything else comes from the step.
| Action | What it does | Step parameters | Keys a message may supply |
|---|---|---|---|
query | Run one SELECT with :name parameters (READ ONLY unless readOnly is false). | sql, params?, readOnly?, maxRows? | params |
execute | Run one INSERT, UPDATE or DELETE with :name parameters; returns rowCount. | sql, params? | params |
poll | Polling trigger read: a SELECT using :cursor and :limit, one message per row, with an optional post-process statement per row. | sql, cursor?, cursorInitial?, limit?, params?, postProcess? | None |
Minimal example
The smallest profile the engine accepts: the required settings only, with synthetic values. Create it with POST /api/adapter-profiles, then test it with POST /api/adapter-profiles/{id}/test.
{
"name": "SQL database (example)",
"adapterType": "sql-database",
"config": {
"host": "example-host",
"database": "example-database",
"user": "example-user",
"password": "synthetic-secret"
}
}Limits
- PostgreSQL, SQL Server, MySQL or MariaDB, and Oracle (thin mode, no Oracle client install). Other databases are not supported.
- Statements are parameterized: values are bound, never pasted into the SQL.
- Read-only calls are a safeguard, not a guarantee (DDL,
COMMITandxp_/UTL_calls can still act): connect with a least-privilege database user. See SQL database. - A SQL Server routing redirect or an Oracle listener redirect passes the same host guard as the profile's host: a redirect to a private address needs
SSRF_ALLOWLIST. - A poll's post-process statement must be idempotent, because a row can be read again after a failure. See SQL database.