Rockset
  • Administration

Workspaces

A workspace is a container that can hold Collections, Collection Aliases, Query Lambdas, and other workspaces.

In this way, workspaces are analogous to folders, whereas their contents (such as collections and Query Lambdas) are analogous to files. Every resource must be part of exactly one workspace. By default, new resources are created in the commons workspace.

Having multiple workspaces is useful for organizations. You can use workspaces to separate resources between test and production environments, or to separate resources for different projects within the same organization.

Creating Workspaces

Workspaces can be created in the Rockset Console or by using the Rockset API directly. To create a workspace in the Rockset Console, select the Add New option in the Workspace dropdown menu during the creation of a new collection.

Add New Workspace

A modal will pop up where you can fill in the workspace's name and description.

Create New Workspace

Note: Once a resource is created inside the workspace, its workspace cannot be changed. A workspace can be deleted using the Rockset API, but only if there are no resources inside that workspace.

The commons Workspace

By default, collections will be created in a workspace named commons. All system-created collections (such as the _events collection created with your organization) will exist in the commons workspace. If you do not specify a workspace when creating or accessing collections, the workspace will default to commons.

Using Workspaces

Workspaces are queried by preceding the collection name in your SQL queries with a dot (.). For instance, the query SELECT user_id, email FROM twitch_data.users will access the collection users in workspace twitch_data.

Note: If you do not specify a workspace when querying a collection, the workspace will default to commons.

For instance, the query DESCRIBE users is equivalent to DESCRIBE commons.users.

When applicable, resources in one workspace can reference resources in other workspaces. For instance, you might have a Query Lambda in a workspace named user_profiles which contains a SQL query referencing collections in the workspaces twitch_data and twitter_data.