
Couchbase Query
CertifiedRun Couchbase N1QL and capture results
Couchbase Query
Run Couchbase N1QL and capture results
Executes the rendered N1QL statement on the target cluster. Defaults to STORE, writing the full result set to Kestra internal storage; use FETCH to return all rows inline or FETCH_ONE for just the first row. Parameters can be named or positional.
type: io.kestra.plugin.couchbase.QueryExamples
Send a N1QL query to a Couchbase database
id: couchbase_query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.couchbase.Query
connectionString: couchbase://localhost
username: couchbase_user
password: "{{ secret('COUCHBASE_PASSWORD') }}"
query: SELECT * FROM `COUCHBASE_BUCKET`
fetchType: FETCH
Properties
connectionString *Requiredstring
1Couchbase connection string
Full connection string (e.g., couchbase://host) rendered with flow variables before opening the cluster.
password *Requiredstring
1Cluster password
Renderable password for authenticating to the cluster; prefer secret storage.
query *RequiredNon-dynamicstring
1Renderable N1QL statement to run
Rendered with flow variables before execution against Couchbase. Ensure bucket, scope, and collection references are accessible to the provided credentials.
username *Requiredstring
1Cluster username
Renderable username for authenticating to the cluster; store sensitive values in secrets.
fetchType string
STORESTOREFETCHFETCH_ONENONEHow to return or store query results
Defaults to STORE, which writes all rows to Kestra internal storage. FETCH returns all rows inline, FETCH_ONE returns the first row, and NONE skips output.
parameters Non-dynamicobjectarray
Query parameters for placeholders
Renderable values for named or positional parameters. Use a map for named parameters or a list/array for positional ones; see Couchbase prepared statement syntax for details.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
row object
First row returned
Present when fetchType resolves to FETCH_ONE; null if the query returns no rows.
rows array
All rows returned
Present when fetchType resolves to FETCH; each row is returned as a JSON map.
size integer
Number of rows returned
Set when fetchType is FETCH or STORE; useful for branching or triggers.
uri string
uriStored result URI
Present when fetchType resolves to STORE; points to the Kestra internal storage object containing all rows.