Worksheets are the primary way to organize SQL work in SQL Studio. You can begin in a scratchpad, save a worksheet privately, or save it into a project when it is ready to share.
The scratchpad is a private editor for one-off analysis. It is not saved as a Foundry resource and cannot be shared with other users.
The scratchpad does not have version history. If its contents are replaced or overwritten, they cannot be restored.
Save SQL code as a worksheet when you want to preserve it beyond the scratchpad. You can save a worksheet in either of the following locations:
You can later save a private worksheet into a project when it is ready to share.
Project worksheets can be opened from either SQL Studio or Compass. You can also save a query from the embedded SQL console as a worksheet.
Each manual save creates a new worksheet version. You can open the worksheet's version history to inspect an earlier version or restore it.
Between manual saves, SQL Studio automatically preserves unsaved changes so that in-progress work remains available between sessions. These changes do not create a version until you manually save the worksheet.
Access to a project worksheet depends on both the worksheet operations and the user's access to its project:
For the corresponding role operations, see SQL permissions.
An Ontology SQL function must be saved as a project worksheet before it can be published. Private worksheets cannot be published as Ontology SQL functions.