Stream Data from Couchbase Server
- Capella Columnar
- how-to
To continuously update a Capella Columnar collection with data hosted on Couchbase Server, create a remote link and collection.
For an example, see Create Remote beer-sample Collections. |
Requirements
Your Columnar account must have either the Project Owner
or Project Manager
role to be able to create a link and its associated collection.
You need to take the following steps on your Couchbase Server database:
-
Configure your Couchbase Server cluster’s network to allow access from Capella Columnar. The steps you must take depend on how and where you deployed your Couchbase Server database. For example, suppose you deployed a self-managed Couchbase Server in AWS. Then to allow Couchbase Columnar to connect, create a VPC peering connection between the VPCs for your Columnar database and the Couchbase Server cluster.
-
Create a user and password for Capella Columnar to use when connecting. Give this user read/write permissions for all buckets and scopes you want to stream. See Manage Users, Groups, and Roles.
-
Get the hostname or external IP address for one of the Couchbase Server nodes. You supply this value to Capella Columnar as the connection string.
-
Save a copy of the Couchbase Server’s cluster certificate. You can get the certificate from two places:
-
Copy the certificate from the Couchbase Server Web Console’s
page under the Trusted Root Certificate. -
Get the certificate by calling Couchbase Server’s
/pools/default/trustedCAs
REST API.
-
-
Note the names of the bucket, scope, and collection you want to stream to Capella Columnar.
Create a Link to a Couchbase Server Database
To create a remote link to a Couchbase Server database:
-
In the Capella UI, select the Columnar tab.
-
Click a cluster name. The workbench opens.
-
Use the explorer to explore the existing databases, scopes, and collections. You can add a database and scope if necessary: see Manage Capella Columnar Services Databases.
-
Select
. The Create Link for <cluster name> Cluster dialog opens. -
Select Couchbase Server/Capella then click Continue.
-
Under Link Type, Select Couchbase Server.
-
In the Couchbase Link Name field, enter a name for the link.
-
In the Connection String field, enter the hostname or IP address of one of the Couchbase Server nodes.
-
Supply the authentication details. You may need to scroll to enter all required values.
-
Select one of the encryption options. If you select either Half or Full, also paste Couchbase Server’s trusted root certificate in the Remote Cluster Certificate field.
-
Click Save & Continue. The link does not automatically connect to the remote source system. See Connect or Disconnect a Remote Link.
You can now create a collection associated with the link.
Create a Collection for Data Streamed from Couchbase Server
Once you have created a link, create a remote collection to receive the data from Couchbase Server:
-
In the Create Link for <cluster name> Cluster dialog, click Create Linked Collection
If you closed the Create Link for <cluster name> Cluster dialog by clicking Complete Later, then under Links move your pointer over the name of the link and choose . -
Select the Columnar database and scope for the new collection and supply a name in the Collection Name field.
-
In the Source fields, enter the names of the Couchbase Bucket, Scope, and Collection you want to shadow.
-
Optionally, enter an expression in the WHERE clause field to filter the documents in the source collection. Do not include the
WHERE
keyword, and supply only a deterministic expression. For example,activity = "eat"
. -
Click Create Collection. Your collection appears in the explorer’s Data section underneath its database and scope.
You can choose to create additional linked collections by clicking Create Another Collection.