Check whether a split change Task is valid.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ValidateShardTask

The operation that you want to perform. Set the value to ValidateShardTask.

DbName String Yes test

DRDS database name

DrdsInstanceId String Yes drds23******

DRDS instance ID

SourceTableName String Yes buyer

SOURCE table name

TargetTableName String Yes buyer_new

Destination table name

TaskType String Yes SINGLE_TO_SHARD

The type of the task. Valid values: SINGLE_TO_SHARD: converting a single table into a sharded table. SHARD_TO_SINGLE: converting a sharded table into a single table. SHARD_TO_SHARD: converting a sharded table into a sharded table.

RegionId String No cn-hangzhou

The ID of the region.

Response parameters

Prameter Type Sample response Description
List

The list of returned check results.

Item String same_schema

The details about a check item.

Result Integer 0

The check result. 0: check passed, 1: Check failed

RequestId String DSSDF-SEWE******

The ID of the request.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample request


http(s)://[Endpoint]/? Action=ValidateShardTask
&DbName=test
&DrdsInstanceId=drds23******
&SourceTableName=buyer
&TargetTableName=buyer_new
&TaskType=SINGLE_TO_SHARD
& <Common request parameters>

Sample success responses

XML format

<ValidateShardTaskResponse>
     <List>
          <element>
               <Item>has_data</Item>
               <Result>0</Result>
          </element>
          <element>
               <item>same_schema</item>
               <result>0</result>
          </element>
          <element>
               <item>uk_in_source_table</item>
               <result>0</result>
          </element>
          <element>
               <item>uk_in_target_table</item>
               <result>0</result>
          </element>
     </List>
     <RequestId>DSSDF-SEWE******</RequestId>
     <success>true</success>
</ValidateShardTaskResponse>

JSON format

{
	"RequestId":"DSSDF-SEWE******",
	"List":[
		{
			"Result":0,
			"Item":"has_data"
		},
		{
			"result":0,
			"item":"same_schema"
		},
		{
			"result":0,
			"item":"uk_in_source_table"
		},
		{
			"result":0,
			"item":"uk_in_target_table"
		}
	],
	"success":true
}

Error codes

For a list of error codes, visit the API Error Center.