Using SQL Editor
Introduction to SQL Editor
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.
- It represents the current workspace, and you can click the Switch button to switch.
- Represents all available data in this job quickly and can be found by searching
- Area for writing SQL Statement
- Status of SQL execution and resources used
- SQL records during execution and historical execution
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.
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.
Execute SQL
You can query SQL immediately in SQL Editor, just like operating a database. The following describes the relevant fields.
No
: represents the number of executing SQLQuery
: SQL for each executionProgress
: execution progressThe first blue circle
: the number of input datasecond blue circle
: processing stageThe third blue circle
: the number of output data
Duration
: execution timeCount
: the number of query resultsAction
: the executable actionUse
: Use this SQL statement, and the SQL Statement will insert into the Editor after clickingCancel
: 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
- magnifying glass: View the execution result of the query.
- 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:
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!
How to store used SQL
Click the Save button below the SQL Editor and select SQL.
In the saved form, fill in the SQL Statement and press Save to complete.
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).