Skip to main content
Version: v4

2.4.1 Overview

SQL Editor introduction​

The SQL Editor is one of the features data analysts use most in a workspace. It lets you immediately design the reports and queries you need.

When you switch to the Analysis module, the page becomes the SQL Editor.

In the SQL Editor, you can see all datasets in the workspace. These datasets may come from different kinds of databases, but in the SQL Editor they can be treated as a single database. It works exactly like a database, but it is virtual rather than physical.

The SQL Editor page is laid out as follows:

  1. The current workspace; click the Switch button to change workspaces.
  2. All datasets / UDFs available in this workspace, with search
  3. The area for writing SQL statements
  4. SQL execution status and resource usage
  5. Running and historical SQL executions

1_sql_editor

Available datasets​

The left sidebar shows the datasets you can use in this workspace, grouped by type (Table/View/Materialized View/Shared Table). Click the triangle icon to expand a type and see the datasets it contains.

Click the triangle icon again to expand a dataset and see each column's type.

View datasets​

When you hover over a dataset or column, the following shortcuts are available.

  1. Insert Table name / Insert Column name: Insert the dataset or column name directly into the SQL Editor
  2. Preview Data: Quickly preview the content of the dataset or column
  3. View SQL Statement: View the dataset's SQL statement. Available for View / Materialized View / Shared Table datasets; not available for Table datasets.
  4. Delete: Delete the dataset

Preview Data​

Preview Data fetches only the first 100 rows for you to browse.

The preview is shown in the lower part of the page.

5_sql_editor