All Products
Search
Document Center

OpenSearch:SQL development

Last Updated:Apr 06, 2023

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

  1. 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.

image
  1. Choose Extended Features > SQL Development.

image
  1. On the SQL Development tab, three groups are displayed: SQL Instances, Index Tables, and Function.

image
Note
  • 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.

image
  • Index Tables: displays the names of index tables in the current cluster.

  • Function: displays user-defined functions.

  1. Create an SQL instance by using scripts. Click the icon next to SQL Instances, and then click Create SQL Instance.

image

Enter the name of the SQL instance.

image

Click OK. The system automatically generates a script for the SQL instance.

image

5. Compile the script. You can modify, format, and run SQL statements in the created SQL instance script.

image

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.

image

Query syntax

For more information, see Query syntax.