Skip to main content
Version: v2

Using SQL Editor

Introduction to SQL Editor

Columns Amount per Table Limitation

The Columns Amount per Table limitation is set at 1000, but you can request a custom amount.

The SQL Editor is one of the essential features in the workspace. Here you can see all the data no matter which database it stores. Several different and heterogenous databases can view as " the concept of a single database" in this SQL Editor. It works exactly like a database, but a virtual rather than a physical one.

The following is the screen introduction of SQL Editor follows.

  1. It represents the current workspace, and you can click the Switch button to switch.
  2. Represents all available data in this job quickly and can be found by searching
  3. Area for writing SQL Statement
  4. Status of SQL execution and resources used
  5. SQL records during execution and historical execution

1_sql_editor

Available Datasets

In the left panel, you can see the Datasets you can use in this workspace. Click the triangle Icon to expand and view which Datasets are available.

For the Dataset, click the triangle Icon to expand and view the data types of each column.

These Columns and Datasets can use unlimitedly in this workspace.

View Datasets

When you slide over each Dataset or Column, you can insert the name of the data table directly into the SQL Editor or preview the data set quickly.

Preview Data

Selecting Preview Data will only retrieve the first 100 data you can browse.

The previewed data will appear at the bottom of the screen.

5_sql_editor

SQL query

SQL query is one of the most frequently used functions by most people in the workspace; you can immediately see all the comprehensive reports and requirements you want to get.

Using ANSI SQL

In SQL Editor, you must use ANSI SQL syntax to write query statements. Please refer to ANSI SQL-related syntax.

6_sql_editor

Execute SQL

You can query SQL immediately in SQL Editor, just like operating a database. The following describes the relevant fields.

32_sql_editor

  • No: represents the number of executing SQL
  • Query: SQL for each execution
  • Progress: execution progress
    • The first blue circle: the number of input data
    • second blue circle: processing stage
    • The third blue circle: the number of output data
  • Duration: execution time
  • Count: the number of query results
  • Action: the executable action
    • Use: Use this SQL statement, and the SQL Statement will insert into the Editor after clicking
    • Cancel: cancel the executing SQL query
  • Result: perform the following actions on the execution result
    • View Query execution results
    • Download data as CSV
    • Dump query results into Materialized View

SQL Query Completion

When you get your data results, you will see the following screen. According to the result, you can click three different Icons in the picture to perform the following actions

7_sql_editor

  • magnifying glass: View the execution result of the query. 8_sql_editor
  • Download: After clicking the download button, the results will be packaged and downloaded as CSV.
  • Form: Save the query result dump as a Materialized View.

You can also view some execution details, such as the start execution time, as shown in the figure below:

9_sql_editor

Commonly used SQL

When you have SQL that you want to share, frequently used SQL, you can store it for future use.

Store SQL

You can save the commonly used SQL within the organization for use by people in the same workspace. Note that other people cannot see the content executed by each of your SQL Editors in the same workspace. SQL, but other people in the same workspace will see the Saved Queries!

10_sql_editor

How to store used SQL

Click the Save button below the SQL Editor and select SQL.

11_sql_editor

In the saved form, fill in the SQL Statement and press Save to complete.

12_sql_editor

Cache SQL

When using SQL, avoid letting people who want to get the same data get it from the database every time. Our system provides a cache by default. When the system wants data, it will check whether it is cached. The system will read the most real-time data if you turn off the switch.

Currently, the system defaults the cache expiration time to 7 days (which can adjust according to usage requirements).

13_sql_editor