The SQL Editor is where you run queries on your dataset and get results.
The worksheet is a document that stores SQL queries. These worksheets are organized in folders, and the system automatically creates a default Draft folder. In this folder, you'll find worksheets with helpful SQL query hints to make writing queries easier.
You can create custom folders for better organization. Folders can be deleted, renamed, and modified, except for the system-generated 'Draft' folder, which remains fixed. Within folders, you have the flexibility to create, duplicate, delete, rename, and move worksheets.
Database explorer panel is used to explore your database objects, which includes namespaces, tables, views, and their columns (even complex columns), and partitions.
To view database objects, expand a database. Each object in the database explorer has a corresponding options menu . You can also open the menu by right-clicking on the item.
Before running a query you must select a running Lakehouse and Database.
To select (or change) the Running lakehouse for a worksheet, click the
Select Lakehouse dropdown in the upper-right corner of the query editor.
To select (or change) the current database for a worksheet, click the
Select Database dropdown in the upper-right corner of the query editor.
You can also select catalog only.
As you enter your script in the query editor, the autocomplete feature suggests:
- Query syntax keywords such as SQL functions or aliases.
- Values that match table or column names within a schema.
IOMETE tracks table aliases and suggests them as autocomplete options. For example, if you execute a query using
employees as e or
employees e as an alias, the next time you type
e, the autocomplete feature suggests the alias as an option.
⌘+Space (Mac) or Ctrl+Space (Windows/Linux).
Use variables in your SQL queries by wrapping them in double curly braces, like
It is necessary to declare a variable before using it. Specifying an expression for the initial value for the variable.After declaring the variable, you can see it in autocomplete.
Currently, you can run only a single query
Using the query editor, run a single query as follows:
- ⌘+Enter (Mac)
- Ctrl+Enter (Windows)
Up to 10,000 rows can be displayed in the results.
The query result includes the following information:
- The duration of the query execution.
- The status of the query execution.
- The number of rows.
- Result table
Download or Share Results
To download your results as a .csv file, click thebutton.
To share your results as a link, click thebutton to copy the link.
Results as CHART
To show result as chart click thebutton.
You can customize the chart using filtering options on the right side.
Using Sort and Filters
You can use column sorting and filtering. Hover over columns to view the filter icon and click. When clicking the filter icon, you can see available filters.
When you run a query, it is tracked as a new item in the SQL history. You can use the SQL history to go back to previous queries so that you can see query results and open queries in the active worksheet.