
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
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-couchbase --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.
Properties
connectionString *string
1Couchbase connection string
Full connection string (e.g., couchbase://host) rendered with flow variables before opening the cluster.
password *string
1Cluster password
Renderable password for authenticating to the cluster; prefer secret storage.
query *string
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 *string
1Cluster username
Renderable username for authenticating to the cluster; store sensitive values in secrets.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150fetchType 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 objectarray
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.
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.