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 "Create Workspace" button in the Collections tab of the Rockset Console. A modal will pop up where you can fill in the workspace's name and description:
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 (
.). For instance, the query
SELECT user_id, email FROM twitch_data.users will access the collection
users in workspace
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
_system is a special workspace that is automatically created in Rockset. This workspace does not appear in the console, but it can be queried to list your current Rockset resources. The resources included in this workspace are:
_system.collection: list of all collections
_system.view: list of all views
_system.alias: list of all aliases
_system.similarity_index: list of all similarity indexes
For example, to list all collections you can run the following query:
SELECT * FROM _system.collection
You can also include filtering in these queries. For example, to list all collections in the commons workspace you can run the following query:
SELECT * FROM _system.collection WHERE workspace = 'commons'
Updated 24 days ago