Skip to content
Reference

Adapter: SQL database

Query, write to and poll a PostgreSQL, SQL Server, MySQL or Oracle database with bound parameters.

On this page

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-full by 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.

SettingTypeRequiredDefaultSecretDescription
dialectenum: postgres, sqlserver, mysql, oracleNopostgresNoDatabase engine: postgres (PostgreSQL), sqlserver (SQL Server), mysql (MySQL or MariaDB) or oracle (Oracle, thin mode).
hoststringYesNoHost.
portnumberNoNoPort (default 5432 PostgreSQL, 1433 SQL Server, 3306 MySQL, 1521 Oracle).
databasestringYesNoDatabase name (Oracle: the service name, or the SID).
oracleSidbooleanNoNoOracle only: the database name is a SID, not a service name.
userstringYesNoUser.
passwordstringYesYesPassword.
tlsobjectNo{"mode":"verify-full"}TLS.
tls.modeenum: verify-full, require, disableNoverify-fullNoTLS: 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.serverCertDnstringNoNoOracle only: the server certificate's subject DN that verify-full matches (default CN=<host>).
tls.caPemstringNoYesCA certificate (PEM) the server certificate must chain to (not Oracle: use NODE_EXTRA_CA_CERTS).
poolSizenumberNo5NoConnections kept open at most.
statementTimeoutMsnumberNo30000NoStatement 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.

ActionWhat it doesStep parametersKeys a message may supply
queryRun one SELECT with :name parameters (READ ONLY unless readOnly is false).sql, params?, readOnly?, maxRows?params
executeRun one INSERT, UPDATE or DELETE with :name parameters; returns rowCount.sql, params?params
pollPolling 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.

json
{
  "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, COMMIT and xp_/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.

Reference