Queries the information about a wide table that is generated after a JOIN operation is performed on multiple tables.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| opensearch:GenerateMergedTable | get | *All Resources * |
| none |
Request syntax
POST /v4/openapi/assist/schema/actions/merge HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| spec | string | No | The specifications of the OpenSearch instance. This parameter is used to check whether the OpenSearch instance meets the special limits on an exclusive instance. Default value: opensearch.share.common. For more information, see the description of the spec field in the Quota topic. | "opensearch.share.common" |
| body | Schema | No | The request body parameters. |
Request body
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| tables | Object | Yes | The table schema. | |
| indexes | Object | No | The index schema. |
Response parameters
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The request ID. |
| result.mergeTable | Object | The wide table that is generated after the JOIN operation is performed on multiple tables. The key is the field name and the value is the field content. |
| result.fromTable | Object | The information about the tables on which the JOIN operation is performed. |
| result.fromTable.tables | Object | The information about the tables. The key is the table name and the value is the information about the table schema. |
| result.fromTable.tables.* | Object | The key is the field name and the value is the field content. |
| result.fromTable.master | String | The primary table. |
| result.fromTable.level | Object | The information about table levels. The table level starts from 0.The key is the table name and the value is the table level. |
| result.fromTable.joinMap | Object | The information about the external table. The key is the table name and the value is the information about the external table. |
| result.fromTable.joinMap.* | Object | The information about the fields of the external table. The key is the field name and the value is the field content. |
| result.primaryKey | String | The primary key field. |
TableFields
| Parameter | Type | Description |
|---|---|---|
| name | String | The name of the field. |
| type | String | The type of the field. For more information, see Fields in a data table. |
| isPk | String | Indicates whether the field is the primary key field. Valid values:0: The field is not the primary key field.1: The field is the primary key field. |
| isMulti | Integer | Indicates whether the field is a multi-value field. Valid values:0: The field is not a multi-value field.1: The field is a multi-value field. |
| isAttribute | Integer | Indicates whether the field is an attribute field. Valid values:0: The field is not an attribute field.1: The field is an attribute field. |
JoinMapFields
| Parameter | Type | Description |
|---|---|---|
| table | String | The name of the external table. |
| key | String | The name of the primary key of the external table. |
| join | Object | The extended fields of the external table. |
Examples
Sample success responses
JSONformat
{
"requestId": "ABCDEFGH",
"result": {
"primaryKey": "-",
"mergeTable": {
"test": "test",
"test2": 1
},
"fromTable": {
"test": "test",
"test2": 1
}
}
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2023-05-24 | The request parameters of the API has changed | View Change Details |
