Table of Contents |
---|
SQL Worksheets
SQL worksheets give you the ability to write SQL queries directly in a workbook. Use SQL worksheets to combine processes that might take several steps using the traditional interface.
Using SQL Worksheets
Open a SQL worksheet
Open a workbook, select Sheets from the menu bar and select Add SQL Sheet.
A new worksheet is added to your workbook with a multiline SQL editor instead of a formula editor.
Write supported SQL syntax to create a query in Datameer's SQL editor like you would when using an actual SQL database.
To activate the query, click the check box on the right side of the SQL editor.
...
Supported features
The Datameer X SQL editor interface emulates structured query language. The following SQL features are available for use within a Datameer X SQL worksheet:
Title | SQL command |
---|---|
Logic functions |
|
Comparison functions |
|
SQL logic |
|
Numeric functions |
|
String functions |
|
Date/Time/Timestamp functions |
|
Case functions |
|
Aggregation functions |
|
Set clauses |
|
Join clauses |
|
...
The run, edit, and delete privileges for the SQL worksheet are as they are assigned for the workbook.
Commentary Function
You can comment in the SQL Editor:
- for commenting a single line:
- for commenting multiline:
Limitations
- Create Table, Delete Table, and Modify Table structure / DDL aren't currently supported.
- Window functions aren't currently supported.
- Using Hive UDFs /UDAs in the SQL editor isn't currently supported.
- Using all the Datameer X functions in the SQL editor isn't currently supported.
- Datameer's LIST data type isn't supported for SQL worksheets.
Performance Tuning
Tip |
---|
If the main query contains the function 'ORDER BY' the Datameer X SQL engine will limit sort task parallelism to '1'. For a better performance, we recommend applying the 'SORT' function to the SQL sheet instead. If the main query contains the function 'ORDER BY' with a limitation we recommend to apply the 'SORT' function with a limit. Both functions turn the SQL sheet to an SQL sheet with inline sort. Datameer X then performs parallel sorting more efficiently. |