Queries a wide table generated by joining multiple tables.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
opensearch:GenerateMergedTable |
get |
*All Resource
|
None | 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, used to verify whether the 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 elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID. |
ABCDEFGH |
| result |
object |
The response parameters. |
|
| primaryKey |
string |
The primary key. |
- |
| mergeTable |
object |
The wide table generated by joining multiple tables. |
- |
| fromTable |
object |
The source tables used in the JOIN operation. |
- |
Response parameters
| Parameter | Type | Description |
| requestId | String | The request ID. |
| result.mergeTable | Object | The wide table generated by joining multiple tables. The key is the field name and the value is the field content. |
| result.fromTable | Object | The source tables used in the JOIN operation. |
| result.fromTable.tables | Object | The table details. The key is the table name and the value is 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 table levels, starting from 0. The key is the table name and the value is the table level. |
| result.fromTable.joinMap | Object | The external table mapping. The key is the table name and the value is the external table details. |
| result.fromTable.joinMap.* | Object | 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
Success response
JSON format
{
"requestId": "ABCDEFGH",
"result": {
"primaryKey": "-",
"mergeTable": {
"test": "test",
"test2": 1
},
"fromTable": {
"test": "test",
"test2": 1
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.