Couchbase Link and Collections
Create a Collection linked to Capella Provisioned or Self Managed Couchbase.
Step 1: Add Couchbase Link Reference
Click the LinkRef button in the Links Table ToolBar. This will bring up the list of choices:
After adding the Link Reference, you will see:
- Click on the Link Reference
- This will enable to Add Collection button
- Note that the Link is not connected. Don't connect it yet.
Step 2: Add Collection
-
Choose the Database (Bucket) and Scope from the drop-down
-
Select the Collections from the Source Cluster
- You can rename the Collection. You would want to do this if this Collection name is already taken up. Remember Columnar Colllection names should be unique for the Scope.
-
You can optionally add a filter to the collection
- Example `type`=`hotel`. This will exclude all documents with this field type and value.
-
Remember that these are the buckets and scopes accessible by the Database credentials used when adding Couchbase Connection in the list of Connections
-
Once satisfied, Proceed with Adding Collections. You then see the Progress
-
You can check the progress
-
This operation takes a little time
-
The info box shows you the DDL being run
-
Dataset and Collection is synonymous
Post Add Collection
Once Collections have been added, the UI now will show:
- The Collections have been added
- Data is still not fetched yet, the link is not connected!
- Now it time to Connect to the source to fetch the data into the Columnar Collection.
Step 3: Connect the Link
- Set the Connect Switch to ON
- This will fetch the documents into the collections
- Note that Items still do show the number of documents
- The Schema column still shows a red tick mark
Step 4: Get Schemas (optional, but nice)
- Click the Get Schemas button. It:
- Fetches the item count
- Fetches one sample document and attaches it to the Collection
- Fetches the schema for that Collection and attaches it to the Collection
infoThis is an expensive operation and need to be performed just once.
The UI now shows:
Example: Adding Collection with Filter
- Example shows how to apply a Filter
- Note that the Collection Name cannot begin with an underscore
- After editing the Filter column, remember to press Enter button.