Couchbase Source
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Preview"
Poll a Couchbase bucket and emit the results.
By default the bucket is queried with the N1QL statement given in the statement property. Set useView to true to poll a MapReduce view instead, selected with designDocumentName and viewName.
Configuration Options
The following table summarizes the configuration options available for the couchbase-source Kamelet:
| Property | Name | Description | Type | Default | Example |
|---|---|---|---|---|---|
Bucket | Required The bucket to use. | string | |||
Hostname | Required The hostname to use. | string | |||
Protocol | Required The protocol to use. | string | |||
Connection String | The full Couchbase SDK connection string (e.g. couchbase://host:port). When set, it takes precedence over hostname extraction for the KV service port. | string | |||
Port | The port to use. | integer | 8091 | ||
Delay | The number of milliseconds between each poll. | integer | 500 | ||
Descending | Return the results in descending order. | boolean | false | ||
Design Document Name | The design document to query. Only used when useView is true. | string | beer | ||
Full Document | Emit the whole document rather than only the fields the query or view returns. | boolean | false | ||
Limit | The maximum number of documents to return per poll. A negative value means no limit. | integer | -1 | ||
Password | Password to connect to Couchbase. | string | |||
Skip | How many documents to skip before returning results. A negative value means none. | integer | -1 | ||
N1QL Statement | The N1QL query to run against the bucket on each poll. Used unless useView is true. | string | SELECT * FROM | ||
Use View | Poll a MapReduce view instead of running the N1QL statement. | boolean | false | ||
Username | Username to connect to Couchbase. | string | |||
View Name | The view to query. Only used when useView is true. | string | brewery_beers |
Dependencies
At runtime, the couchbase-source Kamelet relies upon the presence of the following dependencies:
-
camel:core
-
camel:couchbase
-
camel:kamelet
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:couchbase-source"
parameters:
.
.
.
steps:
- to:
uri: "kamelet:log-sink" You can now run it directly through the following command
camel run route.yaml