Manage Documents with the Capella UI
- Capella Operational
The Couchbase Capella UI provides the Documents tool that you can use to view and edit documents.
This page describes how you can manage documents in a Couchbase cluster using the Documents tool in the Capella UI.
Permissions Required
To use the document editor in the Capella UI, you need the appropriate project role.
|
Accessing Documents in the Capella UI
You can use the Documents tool to view and manage documents in a cluster. Open the Documents tool by opening a cluster and clicking
.Retrieve Documents
You can use the Documents tool to retrieve and view the individual documents contained within a bucket, scope, or collection on the cluster. The retrieved documents are summarized in a table format, with a row for each retrieved document. Document retrieval controls at the top of the summary control the retrieval and display of documents.
The Documents tool has the following controls:
-
Bucket: A drop-down menu that displays the name of the bucket whose documents are shown. You can use the drop-down menu to select from a list of buckets in the current cluster.
-
Scope: A drop-down menu that displays the name of the scope whose documents are shown. The
_default
scope is the default. You can use the drop-down menu to select from a list of all the scopes within the current bucket. -
Collection: A drop-down menu that displays the name of the collection whose documents are shown. The
_default
collection is the default. You can use the drop-down menu to select from a list of all the collections within the current scope. -
Limit: The maximum number of rows—documents—to retrieve and display at once.
-
Offset: The number of documents in the entire set of the current bucket that is skipped, before display begins.
-
Filter By: This field is enabled if the Query Service is running on the cluster.
You can toggle the following options in the Filter By field:
-
ID: Accepts the ID value of a specific document. Leave this field blank to retrieve documents based on Limit and Offset.
-
ID Range: Accepts the Starting ID and Ending ID values to specify the ID range.
-
SQL++ WHERE: Accepts a SQL++ query. A WHERE clause which determines the subset of documents to show.
-
View and Edit Existing Documents
When you use Bucket, Scope, or Collection, the set of retrieved documents is automatically updated based on your selections.
To view and edit documents:
-
Retrieve a set of documents.
-
When using Limit, Offset, Filter BY, or SQL++ WHERE, click Get Documents to retrieve a new set of documents based on your new configuration.
-
Click on a document name in the results area to view and edit the document.
Toggle the following tabs:
Tab Description JSON
Comprises a series of key-value pairs sometimes expressed as name-value pairs. You can make modifications to key-values.
Metadata
View the document’s metadata.
It’s not possible to edit a document’s metadata as Couchbase Capella generates it in association with each document when they’re saved. For more information, see document metadata.
-
Click Save Document to save your changes.
Create Documents
To create a document:
-
Click Create Document.
-
Enter the Document ID and edit the JSON contents of the document.
-
Click Save Document to create the document.
Delete Documents
To delete a document:
-
Retrieve the document to display it in the results area.
-
Click the Trash icon at the end of the row on the right side.
-
In the confirmation field, type
delete
. -
Click Delete Document.
Related Links
To import a set of JSON documents or a CSV file, see Import Data with the Capella UI.