All Products
Search
Document Center

OpenSearch:GenerateMergedTable

Last Updated:Mar 03, 2024

Queries the information about a wide table that is generated after a JOIN operation is performed on multiple tables.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
opensearch:GenerateMergedTableRead
  • All Resources
    *
    none
none

Request syntax

POST /v4/openapi/assist/schema/actions/merge

Request parameters

ParameterTypeRequiredDescriptionExample
specstringNo

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"
bodySchemaNo

The request body parameters.

Request body

ParameterTypeRequiredExampleDescription
tablesObjectYesThe table schema.
indexesObjectNoThe index schema.

Response parameters

ParameterTypeDescriptionExample
object
requestIdstring

The request ID.

ABCDEFGH
resultobject

The response parameters.

primaryKeystring

The primary key.

-
mergeTableobject

The wide table that is generated after the JOIN operation is performed on multiple tables.

-
fromTableobject

The tables on which the JOIN operation is performed.

-

Response parameters

ParameterTypeDescription
requestIdStringThe request ID.
result.mergeTableObjectThe 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.fromTableObjectThe information about the tables on which the JOIN operation is performed.
result.fromTable.tablesObjectThe information about the tables. The key is the table name and the value is the information about the table schema.
result.fromTable.tables.*ObjectThe key is the field name and the value is the field content.
result.fromTable.masterStringThe primary table.
result.fromTable.levelObjectThe 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.joinMapObjectThe information about the external table.The key is the table name and the value is the information about the external table.
result.fromTable.joinMap.*ObjectThe information about the fields of the external table.The key is the field name and the value is the field content.
result.primaryKeyStringThe primary key field.

TableFields

ParameterTypeDescription
nameStringThe name of the field.
typeStringThe type of the field.For more information, see Fields in a data table.
isPkStringIndicates 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.
isMultiIntegerIndicates 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.
isAttributeIntegerIndicates 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

ParameterTypeDescription
tableStringThe name of the external table.
keyStringThe name of the primary key of the external table.
joinObjectThe 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 timeSummary of changesOperation
2023-05-24The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: body