Skip to main content

Worksheets

Worksheets in Databend Cloud are used to organize, run, and save SQL statements. They can also be shared with others in your organization.

Creating Worksheets

To create a new worksheet, click on Worksheets in the sidebar and select New Worksheet.

If your SQL statements are already saved in an SQL file, you can also create a worksheet directly from the file. To do so, click the ellipsis icon to the right of New Worksheet, then select Create from SQL File.

Editing and Running SQL Statements

To edit and run an SQL statement:

  1. Click on the database icon above the SQL editor and select the database you want to query.

  2. Click on the user icon above the SQL editor and choose a role to use. The dropdown list will display all the roles you have been granted, along with any child roles under your roles in the hierarchy. For more information about the role hierarchy, see Inheriting Roles & Establishing Hierarchy.

  3. Edit the SQL statement in the SQL editor.

  4. Click on the warehouse icon under the SQL editor and select a warehouse from the list.

  5. Click Run Script.

The query result shows in the output area. You can click Export to save the whole result to a CSV file, or select one or multiple cells in the output area and press Command + C (on Mac) or Ctrl + C (on Windows) to copy them to your clipboard.

tip
  • To make it easier for you to edit SQL statements, you can select a table in the database list and click the "..." button next to it. Then, follow the menu prompts to choose to copy the table name or all column names to the SQL input area on the right in one click.

  • If you enter multiple statements in the SQL input area, Databend Cloud will only execute the statement where the cursor is located. You can move the cursor to execute other statements. Additionally, you can use keyboard shortcuts: Ctrl + Enter (Windows) or Command + Enter (Mac) to execute the current statement, and Ctrl + Shift + Enter (Windows) or Command + Shift + Enter (Mac) to execute all statements.

Sharing Worksheets

You can share your worksheets with everyone in your organization or specific individuals. To do so, click Share in the worksheet you want to share, or click Share this Folder to share a worksheet folder.

Alt text

In the dialog box that appears, select the sharing scope. You can copy and share the link with the intended recipients, who will also receive an email notification. Please note that if you choose the Designated Members scope, recipients must click the link you share for the sharing to be successful.

  • To view the worksheets shared with you, click Worksheets in the sidebar, then click the Shared with Me tab on the right.
  • When you share a worksheet with others, they can execute the SQL statements in it if they have the necessary permissions, but they won't be able to make any edits to the statements.
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today