Manage Scopes and Collections
- Capella Operational
- how-to
Create, view, and delete scopes and collections to categorize and organize documents within a bucket in a Capella operational cluster.
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 1,000 scopes and up to 1,000 collections. For more information, see Buckets, Scopes, and Collections.
Prerequisites
To create, view, or delete scopes and collections in a cluster, you need:
-
The
Project OwnerorCluster Managerrole for your cluster’s project. If you have theOrganization Ownerrole, you haveProject Owneraccess.
Create a Scope or Collection
To create a scope or collection:
-
In the navigation breadcrumbs in the Capella UI, do 1 of the following:
-
Click your organization name and go to Operational.
-
Click your current project name or search for a project and go to Operational.
-
Expand the cluster breadcrumb and search for a cluster.
-
-
Select your cluster.
-
Choose 1 of the following options:
-
To create a single scope or collection, go to Data Tools.
-
To create multiple scopes and collections at once, go to Buckets.
-
Data Tools
-
Buckets
-
In the side pane, choose whether to create a Scope or a Collection:
-
To create a Scope, find the bucket where you want to create a scope.
-
Next to the name of the bucket where you want to create a scope, go to .
-
In the Scope Name field, enter a scope name.
A scope name can contain only the
A-Z,a-z, and0-9characters as well as the-,_, and%symbols. It cannot start with_or%. It cannot be longer than 251 characters and is case-sensitive.You cannot change a scope’s name after you create it. -
Click Create Scope.
-
-
To create a Collection, find the bucket and scope where you want to create a collection.
-
Next to the name of the scope where you want to create a collection, go to .
-
In the Collection Name field, enter a collection name.
A collection name can contain only the
A-Z,a-z, and0-9characters as well as the-,_, and%symbols. It cannot start with_or%. It cannot be longer than 251 characters and is case-sensitive.You cannot change a collection’s name after you create it. -
In the TTL field, enter a time to live (TTL) 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 more information about collection expiration, see Expiration.
-
Click Create Collection.
-
-
-
In the Buckets list, next to the name of the bucket where you want to create a scope or collection, click
. -
Choose whether to create a Scope or a Collection:
-
To create a Scope, go to the end of the bucket’s scope list and click Add scope.
-
In the Scope name field, enter a scope name.
A scope name can contain only the
A-Z,a-z, and0-9characters as well as the-,_, and%symbols. It cannot start with_or%. It cannot be longer than 251 characters and is case-sensitive.You cannot change a scope’s name after you create it. -
Click Create.
-
(Optional) Create another scope.
-
When you’re done, click Cancel.
-
-
To create a Collection, next to the name of the scope where you want to create a collection, click
.-
At the end of the scope’s collection list, click Add collection.
-
In the Collection name field, enter a collection name.
A collection name can contain only the
A-Z,a-z, and0-9characters as well as the-,_, and%symbols. It cannot start with_or%. It cannot be longer than 251 characters and is case-sensitive.You cannot change a collection’s name after you create it. -
In the Document expiry list, choose how long documents in the collection exist before they expire:
-
Inherit from bucket: Use the bucket’s time to live (TTL) setting. This is the default.
-
Never expire: Keep documents until you delete them.
-
Expire afterâĶ: Enter a TTL for the new collection.
-
-
Click Create.
-
(Optional) Create another collection in the same scope.
-
When you’re done, click Cancel.
-
-
-
View Scopes and Collections
To view scopes and collections:
-
In the navigation breadcrumbs in the Capella UI, do 1 of the following:
-
Click your organization name and go to Operational.
-
Click your current project name or search for a project and go to Operational.
-
Expand the cluster breadcrumb and search for a cluster.
-
-
Select your cluster.
-
Choose 1 of the following options:
-
For a quick overview of your bucket’s scopes and collections, go to Data Tools.
-
To view details and statistics for all of your cluster’s buckets, scopes, and collections, go to Buckets.
-
Data Tools
-
Buckets
In the side pane, explore the tree structure to view your buckets, scopes, and collections.
-
In the Buckets list, view the following statistics for each bucket:
-
Documents: The number of documents in the bucket.
-
Type: Whether the bucket stores data in-memory and on disk, or in-memory only. This column appears only if Memory Only buckets are available to your organization.
-
Storage: The bucket’s storage backend, Couchstore or Magma.
-
Ops/Sec: The number of operations per second on the bucket.
-
Resident Ratio: The percentage of the bucket’s data held in-memory.
-
Disk Used: The amount of disk space the bucket uses.
-
RAM Used/Quota: The amount of memory the bucket uses, compared to its total memory quota across all data nodes.
-
-
Next to the name of the bucket you want to view, click
.The bucket’s scopes appear in alphabetical order, with the
_defaultand_systemscopes last. Each scope shows the number of collections it holds. -
Next to the name of the scope you want to view, click
.The scope’s collections appear with the following statistics:
-
Documents: The number of documents in the collection.
-
Memory used: The amount of memory the collection uses.
-
Disk utilization: The amount of disk space the collection uses.
-
Ops/sec: The number of operations per second on the collection.
-
Document expiry (TTL): Whether the collection inherits the bucket’s time to live (TTL) setting, never expires, or expires after a set amount of time.
A dash ( -) means a statistic is not available yet.
-
-
Delete a Scope or Collection
|
To delete a scope or collection:
-
In the navigation breadcrumbs in the Capella UI, do 1 of the following:
-
Click your organization name and go to Operational.
-
Click your current project name or search for a project and go to Operational.
-
Expand the cluster breadcrumb and search for a cluster.
-
-
Select your cluster.
-
Choose 1 of the following options:
-
Go to Data Tools.
-
Go to Buckets.
-
Data Tools
-
Buckets
-
In the side pane, choose whether to delete a Scope or a Collection:
-
To delete a Scope, in the side pane, find the bucket where you want to delete a scope.
-
Next to the name of the scope you want to delete, go to .
-
Confirm that you want to delete the scope and click Delete.
-
-
To delete a Collection, in the side pane, find the bucket and scope where you want to delete a collection.
-
Next to the name of the collection you want to delete, go to .
-
Confirm that you want to delete the collection and click Delete.
-
-
-
In the Buckets list, next to the name of the bucket where you want to delete a scope or collection, click
. -
Choose whether to delete a Scope or a Collection:
-
To delete a Scope, click the trash can icon ().
-
Confirm that you want to delete the scope and click Delete.
-
-
To delete a Collection, click the trash can icon ().
-
Confirm that you want to delete the collection and click Delete.
-
-
-