
SurrealDB Query
CertifiedRun a SurrealDB query
SurrealDB Query
Run a SurrealDB query
Executes a SurrealQL statement against a SurrealDB database. Defaults to fetchType: STORE, which streams rows to internal storage; use FETCH or FETCH_ONE to surface rows directly. TLS is off by default; keep credentials in secrets.
type: io.kestra.plugin.surrealdb.QueryExamples
Send a SurrealQL query to a SurrealDB database.
id: surrealdb_query
namespace: company.team
tasks:
- id: select
type: io.kestra.plugin.surrealdb.Query
useTls: true
host: localhost
port: 8000
username: surreal_user
password: "{{ secret('SURREALDB_PASSWORD') }}"
database: surreal_db
namespace: surreal_namespace
query: SELECT * FROM SURREAL_TABLE
fetchType: STORE
Properties
database *Requiredstring
1Connection database
host *Requiredstring
1Connection host
namespace *Requiredstring
1Connection namespace
query *RequiredNon-dynamicstring
1SurrealQL query text
connectionTimeout Non-dynamicinteger
60> Connection timeout
Timeout for opening the connection in seconds; default is 60.
fetchType string
STORESTOREFETCHFETCH_ONENONEResult handling mode
Controls how query results are returned. FETCH_ONE outputs the first row, FETCH outputs all rows, STORE writes rows to internal storage, NONE skips output creation.
parameters object
{}Named query parameters
SurrealQL prepared-statement parameters rendered before execution. Provide a map of named placeholders to values.
password string
Plaintext authentication password
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
port Non-dynamicinteger
8000> Connection port
TCP port for the SurrealDB endpoint; default is 8000.
useTls booleanstring
falseEnable TLS for connection
Use TLS when connecting to SurrealDB; default is false.
username string
Plaintext authentication username
Outputs
row object
First fetched row
Populated only when fetchType: FETCH_ONE.
rows array
All fetched rows
Populated only when fetchType: FETCH.
size integer
Number of rows fetched
uri string
uriURI of stored result
Internal storage URI populated only when fetchType: STORE.