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
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.
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.
A modal will pop up where you can fill in the workspace's name and description.
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.
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
Workspaces are queried by preceding the collection name in your SQL queries with a dot (
instance, the query
SELECT user_id, email FROM twitch_data.users will access the collection
users in workspace
Note: If you do not specify a workspace when querying a collection, the workspace will default to
For instance, the query
DESCRIBE usersis equivalent to
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