• Loading Your Data
  • Workspaces

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.

Workspaces are useful for organization. For instance, one might use different workspaces to separate resources between their testing 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

From there, a modal will pop up where you can fill in the workspace's name and description.

Create New Workspace

Once a resource is created inside of a workspace, its workspace cannot be changed. A workspace can be deleted using the Rockset API, but only if there are no resources currently inside of 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. If you to 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.

Join us on Slack!
Building on Rockset? Come chat with us!