The Retrieval Engine Edition provides the SQL development feature. This feature supports the compilation, development, and testing of SQL statements. The feature provides basic functions in the Integrated Development Environment (IDE), such as highlighting, automatic filling, and parameter setting.
Procedure
Log on to the OpenSearch console. In the upper-left corner, select OpenSearch Retrieval Engine Edition. On the Instance Management page, find the instance that you want to manage and click Manage in the Actions column.
Choose Extended Features > SQL Development.
On the SQL Development tab, three groups are displayed: SQL Instances, Index Tables, and Function.
SQL Instances:
The Create SQL Instance and Create Folder features are supported.
You can rename, copy, or delete SQL scripts.
You can save, run, reload, format, and set parameters for SQL scripts. For more information, see kvpair clauses.
In the created SQL scripts, you can write SQL queries and test SQL statements.
Index Tables: displays the names of index tables in the current cluster.
Function: displays user-defined functions.
Create an SQL instance by using scripts. Click the icon next to SQL Instances, and then click Create SQL Instance.
Enter the name of the SQL instance.
Click OK. The system automatically generates a script for the SQL instance.
5. Compile the script. You can modify, format, and run SQL statements in the created SQL instance script.
You can view or download the results on the Result tab, as shown in the following figure. You can also view the logs and query statements on the corresponding tabs.
Query syntax
For more information, see Query syntax.