All Products
Search
Document Center

OpenSearch:Create an application schema by uploading a file

Last Updated:Feb 10, 2023

Procedure

1. Configure the field names and field types of an application schema in a file:

 {
  "table_name": {
   "INT": 1,
   "INT_ARRAY": [
    1,
    2,
    3,
    4
   ],
   "FLOAT": 12.5,
   "FLOAT_ARRAY": [
    12.1,
    12.2,
    12.3
   ],
   "DOUBLE": 12.6,
   "DOUBLE_ARRAY": [
    12.1,
    12.2,
    12.3
   ],
   "LITERAL": "LITERAL type",
   "LITERAL_ARRAY": [
    "OpenSearch",
    "Open",
    "Search"
   ],
   "SHORT_TEXT": "SHORT_TEXT type",
   "TEXT": "TEXT type",
   "TIMESTAMP": 1624502392077,
   "GEO_POINT": "12 15"
  }
 }

Note: The field values are customizable. Configure values of the specified field types.

2. On the Configure Application page, select Use File and upload the file that is configured in Step 1.

image

3. Adjust fields.

image

As shown in the preceding figure, the system may establish incorrect mappings between the field names framed in red and their field types because the types of the fields are not distinguishable by field value. In this case, you need to adjust the types of the fields based on your business requirements after you upload the file.