Couchbase Query

Couchbase Query

Certified

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.

yaml
type: io.kestra.plugin.couchbase.Query

Send a N1QL query to a Couchbase database

yaml
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
Min length1

Couchbase connection string

Full connection string (e.g., couchbase://host) rendered with flow variables before opening the cluster.

Min length1

Cluster password

Renderable password for authenticating to the cluster; prefer secret storage.

Min length1

Renderable N1QL statement to run

Rendered with flow variables before execution against Couchbase. Ensure bucket, scope, and collection references are accessible to the provided credentials.

Min length1

Cluster username

Renderable username for authenticating to the cluster; store sensitive values in secrets.

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
DefaultSTORE
Possible Values
STOREFETCHFETCH_ONENONE

How 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.

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.

First row returned

Present when fetchType resolves to FETCH_ONE; null if the query returns no rows.

SubTypeobject

All rows returned

Present when fetchType resolves to FETCH; each row is returned as a JSON map.

Number of rows returned

Set when fetchType is FETCH or STORE; useful for branching or triggers.

Formaturi

Stored result URI

Present when fetchType resolves to STORE; points to the Kestra internal storage object containing all rows.