Query
Query a SurrealDB database with SurrealQL.
type: "io.kestra.plugin.surrealdb.Query"Examples
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: surreal_passwd
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 *Requiredstring
1SurrealQL query to execute.
connection Non-dynamicSurrealConnection
connectionTimeout Non-dynamicinteger
60 > Connection timeout. Default is 60 seconds.
fetchType string
STORESTOREFETCHFETCH_ONENONEThe way you want to store data.
FETCH_ONE - output the first row. FETCH - output all rows as output variable. STORE - store all rows to a file. NONE - do nothing.
parameters object
{}Query parameters, can be named parameters.
See SurrealDB documentation about SurrealQL Prepared Statements for query syntax.This should be supplied with a parameter map using named parameters.
password string
Plaintext authentication password.
port Non-dynamicinteger
8000 > Connection port. Default value is 8000.
useTls booleanstring
falseSpecify whether to use TLS for connection. Default is false.
username string
Plaintext authentication username.
Outputs
row object
Map containing the first row of fetched data.
Only populated if using fetchType: FETCH_ONE.
rows array
List containing the fetched data.
Only populated if using fetchType: FETCH.
size integer
The number of rows fetched.
uri string
uriThe URI of the stored result in Kestra's internal storage.
Only populated if using fetchType: STORE.