Manage Scopes and Collections

  • Capella Operational
      +
      Scopes and collections, which allow documents to be categorized and organized within a bucket, can be created and deleted within the Capella UI.

      Scopes and collections categorize and organize documents within a bucket. A collection is a data container within a bucket. A scope is a mechanism that groups multiple collections. Each cluster can hold up to 1000 scopes and up to 1000 collections. For a complete overview, see Buckets, Scopes, and Collections.

      Accessing Scopes and Collections in the Couchbase Capella UI

      1. Go to the Operational tab and click your cluster name.

      2. Go to Data Tools.

      3. In the side pane, expand Data to open the Data Insights area.

      4. In the Data Insights area, explore the tree structure to view your buckets, scopes and collections.

      Create a Scope

      To create a scope, you need the Project Owner or Cluster Manager role for the project with the cluster where you’re creating the scope.

      1. Go to the Operational tab and click your cluster name.

      2. Go to Data Tools.

      3. In the side pane, expand Data to open the Data Insights area.

      4. In the Data Insights area, find the bucket where you want to create a scope.

      5. Next to the bucket name where you want to create a scope, go to More Options (⋮)  Add Scope.

      6. In the Scope Name field, enter a scope name.

        A scope name can only contain the A-Z, a-z, and 0-9 characters as well as the -, _, and % symbols. It cannot start with either the _ or % symbols. It cannot be longer than 251 characters in length and is case-sensitive.

      7. Click Create Scope.

      Delete a Scope

      To delete a scope, you need the Project Owner or Cluster Manager role for the project with the cluster where you’re deleting a scope.

      Deleting a scope deletes all of the collections and documents in that scope from the cluster. You can only restore them from a previous backup.

      1. Go to the Operational tab and click your cluster name.

      2. Go to Data Tools.

      3. In the side pane, expand Data to open the Data Insights area.

      4. In the Data Insights area, find the bucket where you want to delete a scope.

      5. Next to the scope name you want to delete, go to More Options (⋮)  Delete Scope.

      6. Confirm that you want to delete the scope.

      7. Click Delete

      Create a Collection

      To create a collection, you need the Project Owner or Cluster Manager role for the project with the cluster where you’re creating the collection.

      1. Go to the Operational tab and click your cluster name.

      2. Go to Data Tools.

      3. In the side pane, expand Data to open the Data Insights area.

      4. In the Data Insights area, find the bucket and scope where you want to create a collection.

      5. Next to the scope name where you want to create a collection, go to More Options (⋮)  Add Collection.

      6. In the Collection Name field, enter a collection name.

        A collection name can only contain the A-Z, a-z, and 0-9 characters as well as the -, _, and % symbols. It cannot start with either the _ or % symbols. It cannot be longer than 251 characters in length and is case-sensitive.

      7. In the TTL field, enter an expiration time in seconds for the new collection. By default, the TTL for collections is 0, meaning it uses its bucket’s TTL value. To prevent the bucket’s TTL from setting a default expiration for your collection’s documents, set the TTL value to -1.

        For information about collection expiration, see Expiration.

      8. Click Create Collection.

      Delete a Collection

      To delete a collection, you need the Project Owner or Cluster Manager role for the project with the cluster where you’re deleting the collection.

      Deleting a collection deletes all of the documents within it from the cluster. You can restore these documents from a previous backup.
      1. Go to the Operational tab and click your cluster name.

      2. Go to Data Tools.

      3. In the side pane, expand Data to open the Data Insights area.

      4. In the Data Insights area, find the bucket and scope where you want to delete a collection.

      5. Next to the collection name you want to delete, go to More Options (⋮)  Delete Collection.

      6. Confirm that you want to delete the collection.

      7. Click Delete.