- Execution of both ThanoSQL and regular SQL commands
- ‘Table Schema’ / ‘Preview’ of data tables
- Query logs
- Data viewer
Overview
The Query Manager page consists of three main sections.
- Query Editor
- Database Explorer
- Query Logs
Query Editor
Execute ThanoSQL queries and view the results in a table format.- Tabs: Write queries and view results in different tabs. You can add or delete tabs as needed.
- Query Input Area: Input queries and execute/stop them. Supports keyboard shortcuts.
- CSV Download: Download result as a CSV file.
- Data Viewer : Used for analyzing unstructured data like images and videos.
- Result Table: Displays query results as a table.
Data Viewer
The Data Viewer feature allows you to view unstructured data within the result table. You can select a column that contains the path to the unstructured file and choose the file format (image, video, audio) to display the unstructured data. The pagination feature at the bottom allows you to adjust the number of items displayed per page and navigate to different pages.Keyboard Shortcuts
Here are the shortcuts supported in the query editor:| Action | Key Combination (Windows/Linux) | Key Combination (Mac OS) |
|---|---|---|
| Execute the current or highlighted query | Ctrl+Enter | Cmd + Enter |
| Auto-complete the current word | Tab or Ctrl + Space | Tab or Cmd + Space |
| Add a comment to the current or selected line | Ctrl+/ | Cmd + / |
| Access the editor menu | Shift + F10 | Shift + F10 |
| Access the list of editor shortcuts | F1 | F1 |
The query editor uses Monaco Editor, which is also used in VSCode. Most shortcuts are the same as those used in VSCode. Please refer to the link for a list of Monaco Editor’s shortcuts.
Database Explorer
You can access the schema and table configuration information of your workspace database. Each workspace provides the public schema and temporary result tables by default. Queries that do not specify a schema will refer to tables in the public schema. Any query executed in the query editor that produces results in tabular form will be stored as aTemporary Result Table with a random table name. This allows you to reuse previous query results as needed.
Table / View Information
The Database Explorer provides information about tables/views within the schema. Click on the table/view name to see the following information.Table Schema
You can check the column name, data type, and nullability of the table/view.Preview
You can quickly see the contents of the selected table/view.Definition
You can see the definition (query statement) of the selected view.Add Data
This is a feature that allows you to add new tables and schemas to the database. You can open the Add Table Data menu by clicking the+ button located in the top right corner of the database explorer.
Create Table
Create a table to the database. Choose one of the following data source upload methods to proceed. (You can also add a table using the right + button in each schema)Create New Table Manually
Create New Table Manually
1
Select the schema in which to create the table
If the desired schema doesn’t exist, you can create a new one.
2
Enter the name of the table you want to create
It can include letters, numbers, and underscores, but it cannot start with a number. You cannot create tables with duplicate names within the same schema.
3
Enter the name of each column that makes up the table
This is a required field, and you cannot create columns with duplicate names within the same table. Depending on the data type, the available options for adjustment may vary, allowing you to configure the column according to its intended purpose.
Local File Upload
Local File Upload
1
Upload a file that matches the format
You can choose the file format (CSV, Excel, etc.). The allowed file extensions are as follows:
- CSV: .csv
- Excel: .xls, .xlsx, .xlsm, .xlsb, .odf, .ods, .odt
2
Select the schema in which to create the table
If the desired schema doesn’t exist, you can create a new one.
3
Enter the name of each column that makes up the table
This is a required field, and you cannot create columns with duplicate names within the same table. Depending on the data type, the available options for adjustment may vary, allowing you to configure the column according to its intended purpose.
4
Select the column configuration method
You can choose to automatically detect columns from the uploaded file or input them manually.
- Auto Detection: Automatically detects the columns in the uploaded file
- Manual Input: Input columns directly, similar to creating a new table from scratch
5
Select the data writing option
You can configure the data writing options as follows:
- Write if Empty: Writes data only when the table does not exist already
- Append to Table: Adds data on top of existing contents if the table already exists
- Overwrite Table: Overwrites the contents of the table if it already exists
Managing Templates
You can manage table templates and query templates. Move by clicking the menu button located in the upper right corner of the Database Explorer.Query Logs
All queries executed in Query Manager are logged and can be viewed in the Query Logs section. They are listed in descending order of creation time. The logs show the executed query statement and whether the execution was successful.You can enter a keyword to search for query logs that were executed with similar query syntax.
- Query Information: Displays the ID, success status, creation time, start execution time, end time, and destination table name of the query.
- Query Statement: Displays the executed query statement.
- Error Message: Displays error messages that occurred during query execution.
- Open as New Query: Opens the query editor tab with the content of the clicked query.