Working with workspaces¶
Important
Starting in September 2025, Snowflake is gradually upgrading accounts from Worksheets to Workspaces. Workspaces will become the default SQL editor. For more information, see Defaulting accounts from Worksheets to Workspaces.
Create and work with files and folders¶
In a workspace you can use a familiar IDE and source control conventions to author, organize, and run code.
Sign in to Snowsight.
In the navigation menu, select Projects » Workspaces.
Select the + next to the appropriate folder. If you’re using Workspaces for the first time, select + Add New.
Select from the following options to create a new file or folder or to upload an existing file or folder:
SQL File: Creates a new, blank SQL file in the editor as a tab in the editor. By default,
.sql
is appended to unnamed files. The editor recognizes it as a SQL file and enables syntax highlighting and autocomplete.File: Creates a new file. Name the file and its extension. If the extension is recognized by the editor (for example, Java, JavaScript, or Scala), code highlighting and autocomplete are enabled.
Folder: Creates a new, empty folder inside the workspace.
Upload Files: Upload one or more files to any location in your workspace. The editor uses the file extension and applies the appropriate icon, behavior, and syntax highlighting to the file when it’s opened. For example,
.sql
files show SQL-specific features.Upload Folder: Select one or more files or folders to add to the selected workspace.
Manage files¶
You can rename, delete, move, and organize your workspaces, files, and folders.
To rename or delete a workspace, file, or folder, follow these steps:
Hover over the target and select the vertical ellipsis
(more actions).
Select Rename or Delete. If you choose to delete, you are prompted to confirm.
To create a folder in a workspace, select the + next to the workspace or an existing folder.
To organize files and folders, drag any file or folder into a different location in the same workspace. You can also drag a worksheet into a workspace.
View multiple files or results in one layout¶
Managing multiple files with tabs and split panes offers several advantages:
Compare code or results side by side: Quickly reference one worksheet query while working on another.
Multitask more efficiently: View different cells, outputs, or files at once with less switching.
To adjust your Workspaces layout, select the vertical ellipsis (more actions) in the Workspaces pane and choose the appropriate option:
Split right
Split down
Close others
Keyboard shortcuts¶
Worksheets provide keyboard shortcuts to help you quickly navigate, customize your view, and edit queries. The following table identifies commonly used keyboard shortcuts:
Task |
MacOS shortcut |
Windows shortcut |
---|---|---|
Run selected |
command + return |
CTRL + Enter |
Run all |
command + shift + return |
CTRL + Alt + Enter |
Split pane horizontally |
control + \ |
CTRL + \ |
Split pane vertically |
control + shift + \ |
CTRL + Shift + \ |
Close focused tab |
control + W |
CTRL + W |
Copy selected file |
command + C |
CTRL + C |
Cut selected file |
command + X |
CTRL + X |
Paste file in selected location |
command + V |
CTRL + V |
Open query results pane |
control + option + ↑ |
CTRL + Alt + ↑ |
Close query results pane |
control + option + ↓ |
CTRL + Alt + ↓ |
Open inline Copilot |
command + I |
CTRL + I |
Comment out code |
command + / |
CTRL + / |
Go to top of file |
command + home or command + ↑ |
CTRL + home or CTRL + ↑ |
Go to bottom of file |
command + end or command + ↓ |
CTRL + end or CTRL + ↓ |
Recover a workspace from a dropped user¶
Even when a user is dropped, their personal database (PDB) and all files within their workspaces are retained. The PDB is then renamed to
DROPPED_USER$<dropped_user_name>_<timestamp>
.
Note
The recovery of a workspace is not limited to the individual who ran the DROP command. Any user with the same role can recover the workspace, as the PDB retains its ownership under the role that initiated the command.
To recover a workspace from a dropped user’s PDB, follow these steps:
Find the dropped user’s PDB. Use the SHOW DATABASES command with a LIKE function to locate the specific database:
SHOW DATABASES LIKE 'dropped_user%';
View the workspaces in the PDB. Use the SHOW WORKSPACES IN DATABASE command to list the available workspaces:
SHOW WORKSPACES IN DATABASE DROPPED_USER$dropped_user_1754344912;
Create a new workspace from the recovered one. Use the CREATE WORKSPACE … FROM command to create a new workspace from the recovered one.
This copies the content to a new location, making it accessible.
Note
You must use the USER$ qualifier to put the workspace in your own personal database. Otherwise, an error occurs. The timestamp at the end of the database name varies.
FROM 'snow://workspace/DROPPED_USER$dropped_user_1754344912.PUBLIC."to_be_recovered"/versions/head';
Limitations¶
Workspaces do not support sharing.
Query filters are not supported. Any queries containing filters will fail.
Workspaces files are not included in Universal Search results.
Opening and editing the same worksheet in the new Workspaces UI and old Worksheets UI simultaneously can result in lost changes.
For worksheets, execution context settings (role, warehouse, and namespace) are not synchronized across the new Workspaces UI and the old Worksheets UI.