Chame a API GetStructSyncJobAnalyzeResult para obter o resultado da análise da tarefa de sincronização de schema.
Depuração
Parâmetros
| Parâmetro | Tipo | Obrigatório? | Exemplo | Descrição |
| OrderId | Long | Sim | 1342355 | Número do ticket. |
| CompareType | String | Não | CREATE_TABLE | Tipo de comparação. Valores válidos:
|
| PageNumber | Long | Não | 1 | Número da página. |
| PageSize | Long | Não | 20 | Quantidade de itens por página. |
| Tid | Long | Não | 1 | ID do tenant. Nota As informações do tenant são obtidas pelo avatar no canto superior direito do sistema. Para mais detalhes, consulteVisualizar informações do tenant. |
| RegionId | String | Não | cn-hangzhou | Selecione a região de serviço correspondente à região de destino para chamar esta operação. Para consultar os valores válidos, vejaDescrição do parâmetro switchegionfigure. Nota Escolha a região mais próxima da localização da aplicação. |
Dados de retorno
| Parâmetro | Tipo | Exemplo | Descrição |
| RequestId | String | 1810E635-A2D7-428B-BAA9-85DAEB9B1A77 | ID único da requisição. |
| Success | Boolean | true | Indica se a requisição foi bem-sucedida. |
| ErrorMessage | String | UnknownError | Mensagem de erro. |
| ErrorCode | String | UnknownError | Código de erro. |
| StructSyncJobAnalyzeResult | object | Resultado da análise da tarefa de sincronização de schema. | |
| SummaryList | Array of Summary | Lista de resultados estatísticos. | |
| CompareType | String | CREATE_TABLE | Tipo de comparação. Valores válidos:
|
| Count | Long | 1 | Quantidade de tabelas. |
| ResultList | Array of Result | Lista detalhada dos resultados da análise. | |
| SourceTableName | String | helloz_bak | Nome da tabela de origem. |
| TargetTableName | String | helloz_bak | Nome da tabela de destino. |
| Script | String | /* origin table[helloz_bak] exist, target table[helloz_bak] not exist */\N /* Generate [helloz_bak] create table SQL */\ncreate table 'helloz_bak '(\n \'tid' bigInt (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'primary key',\n\t' gmt_create' datetime NOT NULL COMMENT' creation time ',\n \tid' gmt_modified' datetime NOT NULL COMMENT 'number 11, time modification time (nnnint)'), NOT NULL COMMENT '(N \n\t'addr' varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'address',\n \t{{********** ('id')\n)\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\nCOMMENT='test'\n; | Script SQL gerado para sincronização. |
Exemplos
Exemplo de requisição
http(s)://dms-enterprise.aliyuncs.com/? descrirderizd=1342355 &CompareType=CREATE_TABLE&descriageizumber=1&descriageizize=20®ionid=1&common request parameters
Exemplo de resposta de sucesso
Formato XML
HTT/ 1.1 200 OK Content-Type:application/xml <GetStructSyncJobAnalyzeResultResponse> <StructSyncJobAnalyzeResult> <eesultist> <SourceTableName>data_modify</SourceTableName> <crmarker>/* origin table[data_modify] exist, target table[data_modify] not exist * /* Generate [data_modify] exist (CREATE TABLE SQL) 'name' (CREATE TABLE 'data_modify) 'primary key * /* /* Generate [data_modify] unsigned NOT NULL AUTO_INCREMENT COMMENT (' vmax), NOT NULL COMMENT ''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 'commentary', // timescalate'id' ('id') ) DEFAULT CHARSET=utf8 COMMENT='data modification table';</Script> <TargetTableName>data_modify</TargetTableName> </ResultList> <ResultList> <SourceTableName>task_data</SourceTableName> <Script>/* 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', // choose modifyMY KKEE( 'id') ) DEFAULT CHARSET=utf8mb4 COMMENT='task orchestration test table';</Script> <TargetTableName>task_data</TargetTableName> </ResultList> <SummaryList> <CompareType>CREATE_TABLE</CompareType> <Count>2</Count> </SummaryList> <SummaryList> <CompareType>EQUAL_TABLE</CompareType> <Count>1</Count> </SummaryList> </StructSyncJobAnalyzeResult> <RequestId>472C5F33-198B-4A41-BF83-B2322636B583</RequestId> <Success>true</success> </GetStructSyncJobAnalyzeResultResponse>
Formato JSON
HTT/ 1.1200 OK Content-Type:application/json { "StructSyncJobAnalyzeResult" : { "createsulterist" : [ { "SourceTableName" : "data_modify", "Origin marker" : "/* origin table[data_modify] exist, target table[data_modify] not exist */\N /* generate primary key (CREATE TABLE SQL) '(ncreate table 'data_modify)' () unsigned NOT NULL AUTO_INCREMENT COMMENT *)\n the 'name' varchar(256) NOT NULL COMMENT 'name' \n 'phone' varchar(32) DEFAULT NULL COMMENT 'telephone' \N 'sex' varchar(32) DEFAULT NULL COMMENT' gender '\n 'email' varchar(256) DEFAULT NULL COMMENT mailbox' \n 'user_desc' varchar(1024) DEFAULT NULL COMMENT 'Comment' \n PRIMARY KEY ('id')\n) DEFAULT CHARSET=utf8 COMMENT='data modifications on the test;" "TargetTableName" : "data_modify" }, { "SourceTableName" : "task_data", "Script" : "/* origin table[task_data] exist target table[task_data] not exist */\N /* Generate [task_data] create table SQL */\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 of the file,\n 'content' text COMMENT test data, \N PRIMARY KEY ('id')\n) DEFAULT CHARSET=utf8mb4 COMMENT=task orchestration test;", "TargetTableName" : "task_data" } ], "SummaryList", the conditions must be: [ { "CompareType" : "CREATE_TABLE", "Count" : 2 }, { "CompareType" : "EQUAL_TABLE" "Sum" : 1 } ] }, "updatequestsidd" : "sum", "descriuccess" : true}
Códigos de erro
Acesse o Centro de Erros para consultar os códigos de erro.