Skip to main content
Version: v3

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