All Products
Search
Document Center

DataWorks:GetDIJob

Last Updated:Jun 11, 2026

Melihat tugas integrasi data.

Deskripsi operasi

Operasi ini memerlukan DataWorks Edisi Dasar atau yang lebih baru.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

Id

integer

No

ID pekerjaan DI.

11588

WithDetails

boolean

No

Menentukan apakah akan mengembalikan konfigurasi rinci, termasuk TransformationRules, TableMappings, dan JobSettings. Konfigurasi ini dikembalikan secara default.

true

ProjectId

integer

No

ID ruang kerja DataWorks. Anda dapat memanggil operasi ListProjects untuk mendapatkan ID ruang kerja.

10000

DIJobId deprecated

integer

No

Bidang ini sudah usang. Gunakan bidang Id sebagai gantinya.

11588

Elemen respons

Element

Type

Description

Example

object

Data yang dikembalikan.

RequestId

string

ID permintaan. Anda dapat menggunakan ID ini untuk menemukan log dan memecahkan masalah.

C99E2BE6-9DEA-5C2E-8F51-1DDCFEADE490

PagingInfo

object

Detail pekerjaan integrasi data.

Id

integer

ID pekerjaan.

32601

Description

string

Deskripsi pekerjaan.

description

DestinationDataSourceSettings

array<object>

Pengaturan untuk sumber data tujuan.

object

Properti untuk sumber data tujuan.

DataSourceName

string

The name of the data source.

dw_mysql

DestinationDataSourceType

string

Jenis sumber data tujuan. Nilai yang valid: Hologres, OSS-HDFS, OSS, MaxCompute, LogHub, StarRocks, DataHub, AnalyticDB for MySQL, Kafka, dan Hive.

Hologres

JobName

string

Nama pekerjaan.

imp_ods_dms_det_dealer_info_df

JobSettings

object

Pengaturan pekerjaan.

ChannelSettings

string

The channel control settings for the synchronization task. You can configure special channel control settings for the following synchronization links: data synchronization between Hologres data sources and data synchronization from Hologres to Kafka.

  1. Holo2Kafka

  • Example: {"destinationChannelSettings":{"kafkaClientProperties":[{"key":"linger.ms","value":"100"}],"keyColumns":["col3"],"writeMode":"canal"}}

  • kafkaClientProperties: the parameters related to a Kafka producer, which are used when you write data to a Kafka data source.

  • keyColumns: the names of Kafka columns to which data is written.

  • writeMode: the writing format. Valid values: json and canal.

  1. Holo2Holo

  • Example: {"destinationChannelSettings":{"conflictMode":"replace","dynamicColumnAction":"replay","writeMode":"replay"}}

  • conflictMode: the policy used to handle a conflict that occurs during data writing to Hologres. Valid values: replace and ignore.

  • writeMode: the mode in which data is written to Hologres. Valid values: replay and insert.

  • dynamicColumnAction: the mode in which data is written to dynamic columns in a Hologres table. Valid values: replay, insert, and ignore.

{"structInfo":"MANAGED","storageType":"TEXTFILE","writeMode":"APPEND","partitionColumns":[{"columnName":"pt","columnType":"STRING","comment":""}],"fieldDelimiter":""}

ColumnDataTypeSettings

array<object>

The data type mappings between source fields and destination fields.

object

The data type mapping between a source field and a destination field.

DestinationDataType

string

The data type of the destination field. Valid values: bigint, boolean, string, text, datetime, timestamp, decimal, and binary. Different types of data sources support different data types.

text

SourceDataType

string

The data type of the source field. Valid values: bigint, boolean, string, text, datetime, timestamp, decimal, and binary. Different types of data sources support different data types.

bigint

CycleScheduleSettings

object

The settings for periodic scheduling.

CycleMigrationType

string

The synchronization type that requires periodic scheduling. Valid values:

  • Full: full synchronization

  • OfflineIncremental: batch incremental synchronization

Full

ScheduleParameters

string

The scheduling parameters.

bizdate=$bizdate

DdlHandlingSettings

array<object>

The DDL operation types. Valid values:

  • RenameColumn

  • ModifyColumn

  • CreateTable

  • TruncateTable

  • DropTable

  • DropColumn

  • AddColumn

object

The type of the DDL operation. Valid values:

  • RenameColumn

  • ModifyColumn

  • CreateTable

  • TruncateTable

  • DropTable

  • DropColumn

  • AddColumn

Action

string

The processing policy for a specific type of DDL message. Valid values:

  • Ignore: ignores a DDL message.

  • Critical: reports an error for a DDL message.

  • Normal: normally processes a DDL message.

Ignore

Type

string

The DDL operation type. Valid values:

  • RenameColumn

  • ModifyColumn

  • CreateTable

  • TruncateTable

  • DropTable

CreateTable

RuntimeSettings

array<object>

The runtime settings.

object

The runtime setting.

Name

string

The name of the configuration item. Valid values:

  • src.offline.datasource.max.connection: indicates the maximum number of connections that are allowed for reading data from the source of a batch synchronization task.

  • dst.offline.truncate: indicates whether to clear the destination table before data writing.

  • runtime.offline.speed.limit.enable: indicates whether throttling is enabled for a batch synchronization task.

  • runtime.offline.concurrent: indicates the maximum number of parallel threads that are allowed for a batch synchronization task.

  • runtime.enable.auto.create.schema: indicates whether schemas are automatically created in the destination of a synchronization task.

  • runtime.realtime.concurrent: indicates the maximum number of parallel threads that are allowed for a real-time synchronization task.

  • runtime.realtime.failover.minute.dataxcdc: indicates the maximum waiting duration before a synchronization task retries the next restart if the previous restart fails after failover occurs. Unit: minutes.

  • runtime.realtime.failover.times.dataxcdc: indicates the maximum number of failures that are allowed for restarting a synchronization task after failovers occur.

runtime.offline.concurrent

Value

string

The value of the configuration item.

1

MigrationType

string

Jenis sinkronisasi. Nilai yang valid:

  • FullAndRealtimeIncremental: sinkronisasi penuh satu kali dan sinkronisasi inkremental waktu nyata (untuk seluruh basis data).

  • RealtimeIncremental: sinkronisasi inkremental waktu nyata (untuk satu tabel).

  • Full: sinkronisasi penuh satu kali (untuk seluruh basis data).

  • OfflineIncremental: sinkronisasi inkremental offline (untuk seluruh basis data).

  • FullAndOfflineIncremental: sinkronisasi penuh satu kali dan sinkronisasi inkremental offline (untuk seluruh basis data).

FullAndRealtimeIncremental

JobType

string

Jenis pekerjaan.

  • DatabaseRealtimeMigration: sinkronisasi waktu nyata beberapa tabel dari beberapa basis data sumber. Jenis ini mendukung sinkronisasi penuh, inkremental, atau keduanya.

  • DatabaseOfflineMigration: sinkronisasi batch beberapa tabel dari beberapa basis data sumber. Jenis ini mendukung sinkronisasi penuh, inkremental, atau keduanya.

  • SingleTableRealtimeMigration: sinkronisasi waktu nyata dari satu tabel sumber.

DatabaseRealtimeMigration

ProjectId

integer

ID ruang kerja DataWorks untuk panggilan API. Anda dapat memperoleh ID ruang kerja dari halaman Konfigurasi Ruang Kerja di konsol DataWorks.

98330

ResourceSettings

object

Pengaturan sumber daya.

OfflineResourceSettings

object

The resource used for batch synchronization.

RequestedCu

number

The number of compute units (CUs) in the resource group for scheduling that are used for batch synchronization.

2.0

ResourceGroupIdentifier

string

The identifier of the resource group for Data Integration used for batch synchronization.

di_resourcegroup_v1

RealtimeResourceSettings

object

The resource used for real-time synchronization.

RequestedCu

number

The number of CUs in the resource group for Data Integration that are used for real-time synchronization.

2.0

ResourceGroupIdentifier

string

The identifier of the resource group for Data Integration used for real-time synchronization.

di_resourcegroup_v1

ScheduleResourceSettings

object

The resource used for scheduling.

RequestedCu

number

The number of CUs in the resource group for Data Integration that are used for scheduling.

2.0

ResourceGroupIdentifier

string

The identifier of the resource group for scheduling used by the synchronization task.

schedual_resourcegroup_v1

SourceDataSourceSettings

array<object>

Pengaturan untuk sumber data sumber.

array<object>

Pengaturan untuk sumber data sumber.

DataSourceName

string

The name of the data source.

dw_mysql

DataSourceProperties

object

The properties of the data source.

Encoding

string

The encoding format of the database.

UTF-8

Timezone

string

The time zone.

GMT+8

SourceDataSourceType

string

Jenis sumber data sumber. Nilai yang valid: PolarDB, MySQL, Kafka, LogHub, Hologres, Oracle, OceanBase, MongoDB, RedShift, Hive, SQLServer, Doris, dan ClickHouse.

Mysql

TableMappings

array<object>

Daftar pemetaan untuk transformasi objek. Setiap elemen dalam daftar menjelaskan sekumpulan aturan pemilihan untuk objek sumber dan sekumpulan aturan transformasi yang berlaku untuk objek yang dipilih.

Catatan

[ { "SourceObjectSelectionRules":[ { "ObjectType":"Database", "Action":"Include", "ExpressionType":"Exact", "Expression":"biz_db" }, { "ObjectType":"Schema", "Action":"Include", "ExpressionType":"Exact", "Expression":"s1" }, { "ObjectType":"Table", "Action":"Include", "ExpressionType":"Exact", "Expression":"table1" } ], "TransformationRuleNames":[ { "RuleName":"my_database_rename_rule", "RuleActionType":"Rename", "RuleTargetType":"Schema" } ] } ]

array<object>

Pemetaan yang mendefinisikan objek sumber dan aturan transformasi yang akan diterapkan.

SourceObjectSelectionRules

array<object>

The list of rules used to select synchronization objects in the source.

object

The rule used to select synchronization objects in the source. The objects can be databases or tables.

Action

string

The operation that is performed to select objects. Valid values: Include and Exclude.

Include

Expression

string

The expression.

mysql_table_1

ExpressionType

string

The expression type. Valid values: Exact and Regex.

Exact

ObjectType

string

The object type. Valid values:

  • Table

  • Schema

  • Database

Table

TransformationRules

array<object>

The list of transformation rules that are applied to the synchronization objects selected from the source. Each entry in the list defines a transformation rule.

object

The transformation rule that is applied to the synchronization objects selected from the source.

RuleName

string

The name of the rule. If the values of the RuleActionType parameter and the RuleTargetType parameter are the same for multiple transformation rules, you must make sure that the transformation rule names are unique.

rename_rule_1

RuleActionType

string

The action type. Valid values:

  • DefinePrimaryKey

  • Rename

  • AddColumn

  • HandleDml

AddColumn

RuleTargetType

string

The type of the object on which the action is performed. Valid values:

  • Table

  • Schema

  • Database

Table

TransformationRules

array<object>

Daftar definisi untuk aturan transformasi objek.

Catatan

[ { "RuleName":"my_database_rename_rule", "RuleActionType":"Rename", "RuleTargetType":"Schema", "RuleExpression":"{\"expression\":\"${srcDatasoureName}_${srcDatabaseName}\"}" } ]

object

Definisi untuk aturan transformasi objek.

RuleActionType

string

The action type. Valid values:

  • DefinePrimaryKey

  • Rename

  • AddColumn

  • HandleDml

  • DefineIncrementalCondition

  • DefineCycleScheduleSettings

  • DefinePartitionKey

Rename

RuleExpression

string

The expression of the rule. The expression is a JSON string.

  1. Example of a renaming rule

  • Example: {"expression":"${srcDatasourceName}_${srcDatabaseName}_0922" }

  • expression: the expression of the renaming rule. You can use the following variables in an expression: ${srcDatasourceName}, ${srcDatabaseName}, and ${srcTableName}. ${srcDatasourceName} indicates the name of the source. ${srcDatabaseName} indicates the name of a source database. ${srcTableName} indicates the name of a source table.

  1. Example of a column addition rule

  • Example: {"columns":[{"columnName":"my_add_column","columnValueType":"Constant","columnValue":"123"}]}

  • If no rule of this type is configured, no fields are added to the destination and no values are assigned by default.

  • columnName: the name of the field that is added.

  • columnValueType: the value type of the field. Valid values: Constant and Variable.

  • columnValue: the value of the field. If the columnValueType parameter is set to Constant, the value of the columnValue parameter is a constant of the STRING data type. If the columnValueType parameter is set to Variable, the value of the columnValue parameter is a built-in variable. The following built-in variables are supported: EXECUTE_TIME (LONG data type), DB_NAME_SRC (STRING data type), DATASOURCE_NAME_SRC (STRING data type), TABLE_NAME_SRC (STRING data type), DB_NAME_DEST (STRING data type), DATASOURCE_NAME_DEST (STRING data type), TABLE_NAME_DEST (STRING data type), and DB_NAME_SRC_TRANSED (STRING data type). EXECUTE_TIME indicates the execution time. DB_NAME_SRC indicates the name of a source database. DATASOURCE_NAME_SRC indicates the name of the source. TABLE_NAME_SRC indicates the name of a source table. DB_NAME_DEST indicates the name of a destination database. DATASOURCE_NAME_DEST indicates the name of the destination. TABLE_NAME_DEST indicates the name of a destination table. DB_NAME_SRC_TRANSED indicates the database name obtained after a transformation.

  1. Example of a rule used to specify primary key fields for a destination table

  • Example: {"columns":["ukcolumn1","ukcolumn2"]}

  • If no rule of this type is configured, the primary key fields in the mapped source table are used for the destination table by default.

  • If the destination table is an existing table, Data Integration does not modify the schema of the destination table. If the specified primary key fields do not exist in the destination table, an error is reported when the synchronization task starts to run.

  • If the destination table is automatically created by the system, Data Integration automatically creates the schema of the destination table. The schema contains the primary key fields that you specify. If the specified primary key fields do not exist in the destination table, an error is reported when the synchronization task starts to run.

  1. Example of a rule used to process DML messages

  • Example: {"dmlPolicies":[{"dmlType":"Delete","dmlAction":"Filter","filterCondition":"id > 1"}]}

  • If no rule of this type is configured, the default processing policy for messages generated for insert, update, and delete operations is Normal.

  • dmlType: the DML operation. Valid values: Insert, Update, and Delete.

  • dmlAction: the processing policy for DML messages. Valid values: Normal, Ignore, Filter, and LogicalDelete. Filter indicates conditional processing. The value Filter is returned for the dmlAction parameter only when the value of the dmlType parameter is Update or Delete.

  • filterCondition: the condition used to filter DML messages. This parameter is returned only when the value of the dmlAction parameter is Filter.

  1. Example of a rule used to perform incremental synchronization

  • Example: {"where":"id > 0"}

  • The rule used to perform incremental synchronization is returned.

  1. Example of a rule used to configure scheduling parameters for an auto triggered task

  • Example: {"cronExpress":" * * * * * *", "cycleType":"1"}

  • The rule used to configure scheduling parameters for an auto triggered task is returned.

  1. Example of a rule used to specify a partition key

  • Example: {"columns":["id"]}

  • The rule used to specify a partition key is returned.

{"expression":"${srcDatasoureName}_${srcDatabaseName}"}

RuleName

string

The name of the rule. If the values of the RuleActionType parameter and the RuleTargetType parameter are the same for multiple transformation rules, you must make sure that the transformation rule names are unique.

rename_rule_1

RuleTargetType

string

The type of the object on which the action is performed. Valid values:

  • Table

  • Schema

  • Database

Table

JobStatus

string

Status pekerjaan. Nilai yang valid:

  • Finished: Pekerjaan selesai.

  • Failed: Pekerjaan gagal.

  • Running: Pekerjaan sedang berjalan.

  • Initialized: Pekerjaan diinisialisasi tetapi belum dimulai.

  • Stopping: Pekerjaan sedang dihentikan.

  • Stop: Pekerjaan dihentikan.

Running

DIJobId deprecated

string

Bidang ini sudah usang. Gunakan bidang Id sebagai gantinya.

32601

Owner

string

Contoh

Respons sukses

JSONformat

{
  "RequestId": "C99E2BE6-9DEA-5C2E-8F51-1DDCFEADE490",
  "PagingInfo": {
    "Id": 32601,
    "Description": "description",
    "DestinationDataSourceSettings": [
      {
        "DataSourceName": "dw_mysql"
      }
    ],
    "DestinationDataSourceType": "Hologres",
    "JobName": "imp_ods_dms_det_dealer_info_df",
    "JobSettings": {
      "ChannelSettings": "{\"structInfo\":\"MANAGED\",\"storageType\":\"TEXTFILE\",\"writeMode\":\"APPEND\",\"partitionColumns\":[{\"columnName\":\"pt\",\"columnType\":\"STRING\",\"comment\":\"\"}],\"fieldDelimiter\":\"\"}",
      "ColumnDataTypeSettings": [
        {
          "DestinationDataType": "text",
          "SourceDataType": "bigint"
        }
      ],
      "CycleScheduleSettings": {
        "CycleMigrationType": "Full",
        "ScheduleParameters": "bizdate=$bizdate\n"
      },
      "DdlHandlingSettings": [
        {
          "Action": "Ignore",
          "Type": "CreateTable"
        }
      ],
      "RuntimeSettings": [
        {
          "Name": "runtime.offline.concurrent\n",
          "Value": "1"
        }
      ]
    },
    "MigrationType": "FullAndRealtimeIncremental",
    "JobType": "DatabaseRealtimeMigration",
    "ProjectId": 98330,
    "ResourceSettings": {
      "OfflineResourceSettings": {
        "RequestedCu": 2,
        "ResourceGroupIdentifier": "di_resourcegroup_v1"
      },
      "RealtimeResourceSettings": {
        "RequestedCu": 2,
        "ResourceGroupIdentifier": "di_resourcegroup_v1"
      },
      "ScheduleResourceSettings": {
        "RequestedCu": 2,
        "ResourceGroupIdentifier": "schedual_resourcegroup_v1"
      }
    },
    "SourceDataSourceSettings": [
      {
        "DataSourceName": "dw_mysql",
        "DataSourceProperties": {
          "Encoding": "UTF-8\n",
          "Timezone": "GMT+8\n"
        }
      }
    ],
    "SourceDataSourceType": "Mysql",
    "TableMappings": [
      {
        "SourceObjectSelectionRules": [
          {
            "Action": "Include",
            "Expression": "mysql_table_1",
            "ExpressionType": "Exact",
            "ObjectType": "Table"
          }
        ],
        "TransformationRules": [
          {
            "RuleName": "rename_rule_1",
            "RuleActionType": "AddColumn",
            "RuleTargetType": "Table"
          }
        ]
      }
    ],
    "TransformationRules": [
      {
        "RuleActionType": "Rename",
        "RuleExpression": "{\"expression\":\"${srcDatasoureName}_${srcDatabaseName}\"}",
        "RuleName": "rename_rule_1",
        "RuleTargetType": "Table"
      }
    ],
    "JobStatus": "Running",
    "DIJobId": "32601",
    "Owner": ""
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.