Skip to main content

Query editor

After selecting data for the query (data source, database, table), run the query.

Image
Query editor screen

1. Set data source

  1. Select data source: Shows a list of all connected data sources of type Data Catalog or MySQL.
  2. Select database: Shows a list of all databases for the selected data source.
  3. 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:

  1. Go to KakaoCloud Console > Analytics > Data Query menu.
  2. In the query editor, select a data source, select a database, and check the list of tables.
  3. Click the More icon on the right of the table for which to use additional features.
  4. Use the following three additional features:

Table features

CategoryDescription
Preview tablePreview table data
- Runs query upon selection
ex) SELECT * FROM {data source}.{database name}.{table name} LIMIT 10
Generate table DDLView table creation info
- Runs query upon selection
ex) SHOW CREATE TABLE {data source}.{database name}.{table name}
Insert into editorInserts table name into editor

2. Run query

After selecting all necessary data sources, write and run an SQL query in the editor.

caution
  1. If query execution exceeds 1 hour, it will be forcibly terminated according to the Trino engine's max execution timeout.
  2. If query planning exceeds 10 minutes, the query will be terminated.

Editor

Functions available in the editor area excluding the data source selection section.

CategoryDescription
EditorWrite query
- Up to 10 queries allowed
- Max query size: 256KB
Query result tabProvides Query result info
Result detail tabProvides Detailed query result info
[Run query] buttonChanges to [Rerun query] after execution
⚠️ Enabled only if query result storage location is set
[Stop execution] buttonCan stop a running query
⚠️ Stop may fail if query already completed
[Reuse query result] dropdownAllows reuse of previous query result without fetching data again

Saved query

You can save important or frequently used queries.

info

Each Project Member can save up to 100 queries.

  1. Go to KakaoCloud Console > Analytics > Data Query menu.
  2. Click the More icon on the right of the editor to use the save query feature.
  3. Use the following four features:

Saved query features

CategoryDescription
SaveSave query
- Immediately updated in saved query list
Save asSave existing query with a new name
- Saved as a new entry in the list
RenameChange the name of a saved query
DeleteDelete saved query
- Removed from both editor and saved query list

View saved query list

  1. Go to KakaoCloud Console > Analytics > Data Query menu.

  2. In the query editor > Saved queries tab, check the list.

    ItemDescription
    Query IDID generated when query is executed
    Query nameName assigned during query save
    QuerySQL query that was run
    Query descriptionDescription of the query
    Save timeTimestamp of when the query was saved
    [Open query] buttonView 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:

  1. Go to KakaoCloud Console > Analytics > Data Query menu.

  2. In the Query editor screen, click the Reuse query result: Disabled button at the bottom right of the editor.

  3. Select a reuse duration from the dropdown:

    OptionDescription
    DisabledDo not use query result reuse (default)
    1 hour agoReuse result if same query was run within 1 hour
    12 hours agoReuse result if same query was run within 12 hours
    24 hours agoReuse result if same query was run within 24 hours
    CustomSet duration manually in minutes or hours
    - Range: 1 to 1440 minutes (24 hours)
caution

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.

  1. Result reuse must be set before running the query.
  2. Query string must be exactly the same as previous execution.
    • Case, whitespace, conditions (WHERE, GROUP BY, JOIN) must match.
  3. Database and Catalog must be identical.
  4. Storage and result configuration must match previous run.
  5. User must have access to all referenced tables.

3. View query result

Provides detailed information about query execution results.

caution

Query results can only be viewed within 24 hours from execution time.

Query result

CategoryDescription
StatusQuery execution status (View details)
- Waiting, Running, Cancelled, Succeeded, Failed
- When reuse is applied: Succeeded - Result reused
Reuse expiryResult reuse expiry time
- Provided when reuse is enabled
Queue timeTime spent waiting before execution
- From submission to actual start
Execution timeTotal time spent executing the query
Scanned data sizeTotal data scanned during execution

Result details

CategoryItemDescription
Basic infoResult statusQuery execution status (View details)
- Waiting, Running, Cancelled, Succeeded, Failed
- When reuse is applied: Succeeded - Result reused
Query IDID generated on query execution
Execution infoInput rowsNumber of rows scanned
Output rowsNumber of rows returned
Input sizeSize of data scanned
Output sizeSize of query result
Time infoStart timeWhen execution started
End timeWhen execution ended
Total timeExecution time + internal processing
Wait timeTime spent in queue before running
Plan timeTime spent planning query
Execution timeTime spent executing the query
[Execution chart] buttonClick to go to Query history detail > Execution flow chart tab
- Not provided when reuse is enabled
[Query result location] buttonClick to go to final path of the Object Storage bucket
- Not provided when reuse is enabled