Menghasilkan ID untuk thread asinkron yang digunakan untuk membuat tugas sinkronisasi di Data Integration.
Deskripsi operasi
DataWorks allows you to use the CreateDISyncTask operation to directly create a batch synchronization task in Data Integration. To create a real-time synchronization task or another type of synchronization task, you must first call the GenerateDISyncTaskConfigForCreating operation to generate the ID of an asynchronous thread and call the QueryDISyncTaskConfigProcessResult operation to obtain the asynchronously generated parameters based on the ID. Then, you can use the parameters as request parameters of CreateDISyncTask and call the CreateDISyncTask operation to create a real-time synchronization task or another type of synchronization task. DataWorks allows you to create real-time synchronization tasks and other types of synchronization tasks in Data Integration only in asynchronous mode.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
ID ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman Ruang Kerja untuk mendapatkan ID tersebut. Anda harus mengonfigurasi parameter ini untuk menentukan ruang kerja DataWorks tempat operasi API diterapkan. |
10000 |
| TaskType |
string |
Yes |
Jenis tugas yang ingin Anda buat di Data Integration dalam mode asinkron. Nilai valid:
DataWorks memungkinkan Anda membuat tugas sinkronisasi pengatur waktu dan jenis tugas sinkronisasi lainnya di Data Integration hanya dalam mode asinkron.
|
DI_REALTIME |
| TaskParam |
string |
Yes |
Skrip untuk tugas sinkronisasi. DataWorks memungkinkan Anda membuat jenis tugas sinkronisasi berikut:
Parameter SelectedTables digunakan untuk menentukan tabel yang ingin Anda sinkronkan dari beberapa database. Parameter Tables digunakan untuk menentukan tabel yang ingin Anda sinkronkan dari satu database.
Kode contoh berikut menyediakan skrip untuk sinkronisasi data dari MySQL ke MaxCompute:
Kode contoh berikut menyediakan skrip untuk sinkronisasi data dari MySQL ke Kafka:
Kode contoh berikut menyediakan skrip untuk sinkronisasi data dari MySQL ke Gudang Data Real-time: |
{ "type": "realtime", "version": "1.0", "setting": { "resourceGroup": "S_res_group_280749521950784_1623033752022", "scheduleResgroupId": 30003913, "name": "openapi_realtime_solution_0813_1739", "taskType": "oneclick_to_odps" }, "steps": [ { "stepType": "mysql", "parameter": { "connection": [ { "datasourceType": "mysql", "datasource": "mysql_pub", "table": [ "xyx" ] } ] }, "name": "Reader", "category": "reader" }, { "stepType": "odps", "parameter": { "datasource": "odps_first" }, "name": "Writer", "category": "writer" } ] } |
| ClientToken |
string |
No |
Token Klien yang digunakan untuk memastikan idempotensi permintaan. Parameter ini mencegah operasi berulang yang disebabkan oleh beberapa pemanggilan. |
ABFUOEUOTRTRJKE |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| RequestId |
string |
The request ID. |
0bc1411515937635973**** |
| Data |
object |
The information returned for the ID of the asynchronous thread. |
|
| Status |
string |
Indicates whether the ID of the asynchronous thread is generated. Valid values: Valid values:
|
true |
| ProcessId |
integer |
The ID of the asynchronous thread. You can call the QueryDISyncTaskConfigProcessResult operation to obtain the asynchronously generated parameters based on the ID. The parameters are used to create a synchronization task in Data Integration. |
10 |
| Message |
string |
The reason why the ID of the asynchronous thread fails to be generated. If the ID is successfully generated, no value is returned for this parameter. |
XXX is invalid. |
Contoh
Respons sukses
JSONformat
{
"Success": true,
"RequestId": "0bc1411515937635973****",
"Data": {
"Status": "true",
"ProcessId": 10,
"Message": "XXX is invalid."
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.DI.Parameter | The parameter is invalid. | |
| 400 | Invalid.DI.Parameter.File.Existed | The file name already exists. | |
| 500 | InternalError.DI.Parameter | A DI internal error occurred. | |
| 403 | Forbidden.DI.NoPrivilege | No access. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.