Call the ListDBTaskSQLJobDetail to obtain the details of the SQL task.

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.

Parameters

Parameter Type Required Example Description
JobId Long Yes 12345

SQL task ID, you can call ListDBTaskSQLJob Obtain the parameter.

PageNumber Long No 1

Which pages.

PageSize Long No 20

The amount of data per page.

Tid Long No 1

The tenant ID.

Note Take the tenant ID information displayed in the upper right corner of the system. For details, see View tenant information .
RegionId String No cn-hangzhou

Select the service region of DMS to call the interface. For the value, see RegionID parameter description .

Note Please select nearby according to the application location.

Return data

Parameter Type Example Description
RequestId String B5937485-6644-4ADC-82F9-573DFE751708

The request ID.

Success Boolean true

Whether the request is successful.

ErrorMessage String UnknownError

Error message.

ErrorCode String UnknownError

Error code.

DBTaskSQLJobDetailList Array of DBTaskSQLJobDetail

The list of SQL task details.

JobDetailId Long 12345

The SQL task ID.

CurrentSql String update a set id = 1 where id = 1;

The SQL currently executed.

ExecuteCount Long 1

The number of executions.

JobId Long 432423

The SQL task ID.

DbId Long 43253

The database ID.

Logic Boolean false

Whether it is a logical Library. Value:

  • true : Yes
  • false : No
Skip Boolean false

Whether the SQL script is skipped, value:

  • true : Yes
  • false : No
SqlType String UPDATE

SQL type, such as DELETE, UPDATE, ALTER_TABLE, etc.

Status String SUCCESS

SQL details status. Valid values:

  • INIT : Initialization status
  • PENDING : Waiting for task crawl
  • BE_SCHEDULED : to be scheduled
  • FAIL : execution failed
  • SUCCESS : execution succeeded
  • PAUSE : Pause
  • DELETE : delete
  • RUNNING : Executing
TotalCount Long 1

The total number of SQL statements.

Examples

Sample requests


     http(s)://dms-enterprise.aliyuncs.com/? JobId=12345 &PageNumber=1 &PageSize=20 &Tid=1&Public request parameters 
   

Sample success responses

XML Format


     HTTP/1.1 200 OK Content-Type:application/xml <ListDBTaskSQLJobDetailResponse> <TotalCount>2</TotalCount> <DBTaskSQLJobDetailList> <Status>SUCCESS</Status> <Skip>false</Skip> <DbId>7000000</DbId> <SqlType>CREATE_TABLE</SqlType> <ExecuteCount>1</ExecuteCount> <<Logic>false</Logic> <CurrentSql> /* origin table[data_modify] exception, target table[data_modify] not exist * /* Generate [data_modify] create table SQL */ create table 'data_modify ' ( 'id' bigInt (20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key', 'name' varchar(256) NOT NULL COMMENT 'name', 'phone' varchar(32) DEFAULT NULL COMMENT 'phone', 'sex' varchar(32) DEFAULT NULL COMMENT 'gender', 'email' varchar(256) DEFAULT NULL COMMENT 'Mailbox', "user_desc' varchar(1024) DEFAULT NULL COMMENT" Remarks ", PRIMARY KEY ('id') ) DEFAULT CHARSET=utf8 COMMENT='Data modification test table' </CurrentSql> <JobDetailId>140000004</JobDetailId> <JobId>3000000</JobId> </DBTaskSQLJobDetailList> <DBTaskSQLJobDetailList> <Status>SUCCESS</Status> <Skip>false</Skip> <DbId>7000000</DbId> <SqlType>CREATE_TABLE</SqlType> <<ExecuteCount>1 <Logic>false</Logic> <CurrentSql> /* origin table[task_data] exist, target table[task_data] not exist * /* Generate [task_data] create table SQL */ create table 'task_data' ( 'id' bigInt (20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key', 'gmt_create' datetime NOT NULL COMMENT 'creation time',' gmt_modified' datetime NOT NULL COMMENT 'modification time', 'content' text COMMENT 'test data', PRIMARY KEY ('id') ) DEFAULT CHARSET=utf8mb4 COMMENT='Task orchestration test table' </CurrentSql> <JobDetailId>140000005</JobDetailId> <JobId>3000000</JobId> </DBTaskSQLJobDetailList> <RequestId>F3C2F73D-1B39-4C1D-AC00-882DB2BD61FD</RequestId> <Success>true</Success> </ListDBTaskSQLJobDetailResponse> 
   

JSON Format


     HTTP/1.1 200 OK Content-Type:application/json { "TotalCount" : 2, "DBTaskSQLJobDetailList" : [ { "Status" : "SUCCESS", "Skip" : false, "DbId" : 7000000, "SqlType" : "CREATE_TABLE", "ExecuteCount" : 1, "Logic" : false, "CurrentSql" : "/* origintable [data_modify] exist, target table[data_modify] not exist */\n\n/* Generate [data_modify] create table SQL */\n\ncreate table 'data_modify ' (\n 'id' bigInt (20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',\n 'name' varchar(256) NOT NULL COMMENT 'name', \N 'phone' varchar(32) DEFAULT NULL COMMENT 'Telephone', \N 'sex' varchar(32) DEFAULT NULL COMMENT 'gend',\n 'email' varchar(256) DEFAULT NULL COMMENT 'Mailbox',\n' user_desc' varchar(1024) DEFAULT NULL COMMENT 'Remarks ',\N PRIMARY KEY ('id')\n) DEFAULT CHARSET=utf8 COMMENT='Data Modification Test Table'", "JobDetailId": 14000004, "JobId" : 3000000 }, { "Status" : "SUCCESS", "Skip" : false, "DbId" : 70000, "SqlType" : "CREATE_TABLE", "ExecuteCount" : 1, "Logic" : false, "CurrentSql" : "\n\n/* origin table[task_data] exist, target table[task_data] not exist */\n\n/* Generate [task_data] create table SQL */\n\ncreate table 'task_data' (\n 'id' bigInt (20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',\n 'gmt_create' datetime NOT NULL COMMENT' creation time',\n 'gmt_modified' datetime NOT NULL COMMENT' modification time',\n 'content' text COMMENT' test data', \N PRIMARY KEY ('id')\n) DEFAULT CHARSET=utf8mb4 COMMENT='task orchestration test table'", "Jobetilid": 14000005, "Jobid" : 3000000 } ], "Requestid" : "F3C2F73D-1B39-4C1D-AC00-882DB2BD61FD", "Success" : true} 
   

Error code

Access Error Center See more error codes.