Query editor
After selecting data for the query (data source, database, table), run the query.
Query editor screen
1. Set data source
- Select data source: Shows a list of all connected data sources of type Data Catalog or MySQL.
- Select database: Shows a list of all databases for the selected data source.
- Select table: Shows a list of all tables in the selected database.
Manage table
You can check the fields of a table and use the following additional features per table:
- Go to KakaoCloud Console > Analytics > Data Query menu.
- In the query editor, select a data source, select a database, and check the list of tables.
- Click the More icon on the right of the table for which to use additional features.
- Use the following three additional features:
Table features
Category | Description |
---|---|
Preview table | Preview table data - Runs query upon selection ex) SELECT * FROM {data source}.{database name}.{table name} LIMIT 10 |
Generate table DDL | View table creation info - Runs query upon selection ex) SHOW CREATE TABLE {data source}.{database name}.{table name} |
Insert into editor | Inserts table name into editor |
2. Run query
After selecting all necessary data sources, write and run an SQL query in the editor.
- If query execution exceeds 1 hour, it will be forcibly terminated according to the Trino engine's max execution timeout.
- If query planning exceeds 10 minutes, the query will be terminated.
Editor
Functions available in the editor area excluding the data source selection section.
Category | Description |
---|---|
Editor | Write query - Up to 10 queries allowed - Max query size: 256KB |
Query result tab | Provides Query result info |
Result detail tab | Provides Detailed query result info |
[Run query] button | Changes to [Rerun query] after execution ⚠️ Enabled only if query result storage location is set |
[Stop execution] button | Can stop a running query ⚠️ Stop may fail if query already completed |
[Reuse query result] dropdown | Allows reuse of previous query result without fetching data again |
Saved query
You can save important or frequently used queries.
Each Project Member can save up to 100 queries.
- Go to KakaoCloud Console > Analytics > Data Query menu.
- Click the More icon on the right of the editor to use the save query feature.
- Use the following four features:
Saved query features
Category | Description |
---|---|
Save | Save query - Immediately updated in saved query list |
Save as | Save existing query with a new name - Saved as a new entry in the list |
Rename | Change the name of a saved query |
Delete | Delete saved query - Removed from both editor and saved query list |
View saved query list
-
Go to KakaoCloud Console > Analytics > Data Query menu.
-
In the query editor > Saved queries tab, check the list.
Item Description Query ID ID generated when query is executed Query name Name assigned during query save Query SQL query that was run Query description Description of the query Save time Timestamp of when the query was saved [Open query] button View full query and open in new tab of the editor
Reuse query result
When enabled, this feature allows reuse of previous results for identical queries without refetching data, improving performance and reducing scan cost.
To use query result reuse:
-
Go to KakaoCloud Console > Analytics > Data Query menu.
-
In the Query editor screen, click the
Reuse query result: Disabled
button at the bottom right of the editor. -
Select a reuse duration from the dropdown:
Option Description Disabled Do not use query result reuse (default) 1 hour ago Reuse result if same query was run within 1 hour 12 hours ago Reuse result if same query was run within 12 hours 24 hours ago Reuse result if same query was run within 24 hours Custom Set duration manually in minutes or hours
- Range: 1 to 1440 minutes (24 hours)
To enable query result reuse, all of the following conditions must be met. If any condition is not satisfied, the query is rerun instead of using saved result.
- Result reuse must be set before running the query.
- Query string must be exactly the same as previous execution.
- Case, whitespace, conditions (WHERE, GROUP BY, JOIN) must match.
- Database and Catalog must be identical.
- Storage and result configuration must match previous run.
- User must have access to all referenced tables.
3. View query result
Provides detailed information about query execution results.
Query results can only be viewed within 24 hours from execution time.
Query result
Category | Description |
---|---|
Status | Query execution status (View details) - Waiting , Running , Cancelled , Succeeded , Failed - When reuse is applied: Succeeded - Result reused |
Reuse expiry | Result reuse expiry time - Provided when reuse is enabled |
Queue time | Time spent waiting before execution - From submission to actual start |
Execution time | Total time spent executing the query |
Scanned data size | Total data scanned during execution |
Result details
Category | Item | Description |
---|---|---|
Basic info | Result status | Query execution status (View details) - Waiting , Running , Cancelled , Succeeded , Failed - When reuse is applied: Succeeded - Result reused |
Query ID | ID generated on query execution | |
Execution info | Input rows | Number of rows scanned |
Output rows | Number of rows returned | |
Input size | Size of data scanned | |
Output size | Size of query result | |
Time info | Start time | When execution started |
End time | When execution ended | |
Total time | Execution time + internal processing | |
Wait time | Time spent in queue before running | |
Plan time | Time spent planning query | |
Execution time | Time spent executing the query | |
[Execution chart] button | Click to go to Query history detail > Execution flow chart tab - Not provided when reuse is enabled | |
[Query result location] button | Click to go to final path of the Object Storage bucket - Not provided when reuse is enabled |