OpenSearch Retrieval Engine Edition provides an SQL development feature that supports compiling, developing, and testing SQL statements. It includes basic IDE features such as syntax highlighting, auto-completion, and parameter settings.
Procedure
-
Go to the OpenSearch console. In the upper-left corner, switch to OpenSearch Retrieval Engine Edition. On the Instance Management page, find your instance in the list, and then click Manage in the Actions column.
-
Navigate to Extended Features > SQL Development.
-
The OpenSearch Retrieval Engine Edition - SQL Development tab contains three panes: SQL instances, index tables, and function.
-
SQL instances:
-
Supports Create SQL instance and Create Folder.
-
Supports renaming, copying, and deleting SQL scripts.
-
Supports saving, running, reloading, and formatting SQL scripts, as well as setting parameters (for more information, see kvpair clause).
-
After you create an SQL script, you can use the editor to write, run, and test your queries.
-
-
Index tables: Displays the names of the index tables in the current cluster.
-
Function: Displays available user-defined functions (UDFs).
-
Create an SQL instance script. Click the button next to SQL instances and select Create SQL instance:
Enter a name for the SQL instance and click OK. The system automatically generates a script file for the instance.
5. Write the script. In the new SQL instance script file, you can edit, format, and run your SQL query.
You can view and download the results in the pane below. You can also view the execution logs and the original query.
Query syntax
For more information, see Query statements.
Notes
-
You cannot use a SELECT statement to retrieve date, time, or timestamp fields.