Skip to main content

Data Integration Tasks

Read the Overview first for authentication, request conventions, and errors.

A data integration task reads from a data source and writes to a Databend table. The task type comes from the serviceId of its data source. All task endpoints are v2, except Get Sync Metrics. Send orgSlug in the body.

Source (serviceId)Task objectMode
AWS S3 (1)awsS3FileOne-time file load.
AWS SQS (S3) (5)awsS3FileContinuous: loads new files from S3 event messages.
Alibaba Cloud MNS (OSS) (8)awsS3FileContinuous: loads new files from OSS event messages.
Kafka (7)kafkaConsumerContinuous: writes NDJSON files to the stage @kafka_consumer/<task-name>/.
MySQL (2)mysqlTaskSnapshot, CDC, or snapshot then CDC.
PostgreSQL (3)postgresTaskSnapshot, CDC, or snapshot then CDC.
TiDB (6)tidbTaskSnapshot, CDC, or snapshot then CDC.

List Tasks​

POST /api/v2/data-integration/tasks · Read · Member

FieldTypeRequiredDescription
orgSlugstringYesOrganization ID.
pageintegerNoPage number. Default: 1.
perPageintegerNoRows per page. Default: 20.
serviceIdinteger (enum)NoFilter by the Service ID of the data source.
datasourceIdintegerNoFilter by data source ID.

Response example. taskStatus is a task status. lastRunData is the last run data.

{
"success": true,
"data": {
"total": 1,
"page": 1,
"perPage": 20,
"list": [
{
"id": 45,
"name": "orders_sync",
"orgId": "1024",
"datasourceId": 12,
"datasourceServiceId": 2,
"kind": "mysql",
"taskStatus": 2,
"warehouse": "default",
"database": "raw_shop",
"tableName": "orders",
"continuousIngestion": 1,
"mysqlTask": { "syncMode": 3, "includeTables": ["orders"], "conflictKey": "id", "allowDelete": true },
"lastRunId": "a9f3c2e1",
"lastRunData": { "kind": "mysql", "status": 1, "mysqlLastRun": { "phase": "cdc", "rowsSynced": "1203344", "dataFressness": "4" } },
"lastRunCreatedAt": "2026-11-09T07:00:00Z",
"createdAccountEmail": "alice@example.com",
"createdAt": "2026-11-01T02:00:00Z",
"updatedAt": "2026-11-01T02:00:00Z"
}
]
}
}

kind is one of awsS3, awsSqsS3, mnsOss, kafka, mysql, postgres, tidb. serviceArgs (if present) is a JSON string copy of the task object. Read the typed object (mysqlTask and so on) instead.

Get a Task​

POST /api/v2/data-integration/task/{taskId}/info · Read · Member

ParameterInTypeRequiredDescription
taskIdpathintegerYesTask ID.
orgSlugbodystringYesOrganization ID.

Response: data is one task object with the same fields as one item of List Tasks. For SQS (S3), MNS (OSS), and Kafka tasks, runtimeConfig shows the runtime unit and its price.

Preview Source Data​

POST /api/v2/data-integration/service/preview · Probe · Member

Reads a sample from the source. Use the result to choose the target columns before you create a task.

FieldTypeRequiredDescription
orgSlugstringYesOrganization ID.
datasourceIdintegerYesData source ID.
One task objectobjectYesawsS3File, kafkaConsumer, mysqlTask, postgresTask, or tidbTask. Use the object that matches the data source.

Request example (S3 CSV files):

{
"orgSlug": "<organization-id>",
"datasourceId": 10,
"awsS3File": {
"region": "us-east-2",
"filePath": "s3://acme-raw/orders/2026-11-*.csv",
"fileType": 1,
"fileCsvArgs": { "fieldDelimiter": ",", "recordDelimiter": "\n", "skipHeader": 1 }
}
}

Response example. headerNames[i] and headerTypes[i] describe column i. sampleLines are raw sample rows.

{
"success": true,
"data": {
"kind": "awsS3",
"awsS3Files": [{ "region": "us-east-2", "filePath": "s3://acme-raw/orders/2026-11-01.csv", "fileType": 1, "fileSize": 10240 }],
"headerNames": ["id", "amount", "created_at"],
"headerTypes": ["BIGINT", "DOUBLE", "TIMESTAMP"],
"sampleLines": ["1,19.9,2026-11-01 08:00:00"]
}
}

List Runtime Units​

POST /api/v2/data-integration/runtime-units · Read · Member

Returns the compute units that a continuous consumer task can use, and their price per hour.

FieldTypeRequiredDescription
orgSlugstringYesOrganization ID.
runtimeKindstring (enum)Yessqs-s3-consumer, mns-oss-consumer, or kafka-consumer.

Response. The list is in data.

{
"success": true,
"data": [
{ "runtimeKind": "kafka-consumer", "unit": "4XSmall", "displayName": "4XSmall", "default": true, "prices": [{ "currencyCode": "USD", "currencySymbol": "$", "pricePerHour": "<price>" }] },
{ "runtimeKind": "kafka-consumer", "unit": "3XSmall", "displayName": "3XSmall", "prices": [{ "currencyCode": "USD", "currencySymbol": "$", "pricePerHour": "<price>" }] }
]
}

Units: 4XSmall (1 CPU, 4 GiB, default), 3XSmall (2 CPU, 8 GiB), 2XSmall (4 CPU, 16 GiB).

Create a Task​

POST /api/v2/data-integration/task/create · Write · Member

Creates a task in the stopped state. To start it, call Operate Tasks with operate: 1.

FieldTypeRequiredDescription
orgSlugstringYesOrganization ID.
namestringYesUnique task name in the organization.
datasourceIdintegerYesData source ID. The data source decides the task type.
warehousestringDependsWarehouse that writes to Databend. Required for all task types except Kafka.
databasestringDependsTarget database. Required for S3, SQS (S3), MNS (OSS), PostgreSQL, and MySQL tasks that use includeTables. TiDB tasks and rule-based MySQL tasks derive the target database from the source database name. Kafka tasks do not use it.
tableNamestringDependsTarget table. Required for S3, SQS (S3), MNS (OSS), PostgreSQL, and MySQL tasks that use includeTables. Must be empty for rule-based MySQL tasks. Kafka tasks do not use it.
tableFieldsTableField[]DependsTarget columns. Required for S3, SQS (S3), and MNS (OSS) tasks. Each item needs name and type.
awsS3FileAwsS3FileDependsRequired for S3, SQS (S3), and MNS (OSS) tasks. filePath is required for S3 (serviceId 1).
kafkaConsumerKafkaConsumerArgsDependsRequired for Kafka tasks.
mysqlTaskMysqlTaskArgsDependsRequired for MySQL tasks.
postgresTaskPostgresTaskArgsDependsRequired for PostgreSQL tasks.
tidbTaskTiDBTaskArgsDependsRequired for TiDB tasks.
continuousIngestionintegerNo0 off, 1 on. The server sets it from the source type and sync mode.
runtimeConfigobjectNo{ "unit": "4XSmall" }. Only for SQS (S3), MNS (OSS), and Kafka tasks. Default: the default unit of List Runtime Units.

Request example (MySQL, snapshot then CDC, one table):

{
"orgSlug": "<organization-id>",
"name": "orders_sync",
"datasourceId": 12,
"warehouse": "<warehouse-name>",
"database": "raw_shop",
"tableName": "orders",
"mysqlTask": {
"syncMode": 3,
"includeTables": ["orders"],
"conflictKey": "id",
"allowDelete": true
}
}

Request example (MySQL, several databases with table rules):

{
"orgSlug": "<organization-id>",
"name": "shards_sync",
"datasourceId": 12,
"warehouse": "<warehouse-name>",
"mysqlTask": {
"syncMode": 3,
"tableRules": ["shard_*.*", "!*.tmp_*"],
"targetDatabasePrefix": "raw_",
"allowDelete": true
}
}

Request example (Kafka). The task writes files. It does not need warehouse, database, or tableName.

{
"orgSlug": "<organization-id>",
"name": "events_stream",
"datasourceId": 14,
"kafkaConsumer": {
"topics": "orders,payments",
"offsetReset": "EARLIEST",
"dataFormat": "JSON"
},
"runtimeConfig": { "unit": "4XSmall" }
}

Request example (AWS SQS (S3), continuous CSV load):

{
"orgSlug": "<organization-id>",
"name": "clicks_ingest",
"datasourceId": 15,
"warehouse": "<warehouse-name>",
"database": "web",
"tableName": "clicks",
"tableFields": [
{ "name": "ts", "type": "TIMESTAMP", "nullable": false },
{ "name": "url", "type": "VARCHAR", "nullable": true }
],
"awsS3File": {
"fileType": 1,
"fileCsvArgs": { "fieldDelimiter": ",", "recordDelimiter": "\n", "skipHeader": 1 },
"copyIntoOnError": 1
}
}

Response. The ID is at the top level.

{ "success": true, "id": 45 }

Update a Task​

POST /api/v2/data-integration/task/{taskId}/update · Write · Creator or Admin

Replaces the task settings. The body is the same as Create a Task, plus taskId in the path. Send all fields, not only the changed ones.

Rules:

  • The task must be stopped. Stop it first with Operate Tasks.
  • You cannot change the source type. The new datasourceId must have the same serviceId.

Response: { "success": true }.

Operate Tasks​

POST /api/v2/data-integration/task/operate · Write · Creator or Admin

Starts, stops, or deletes one or more tasks.

FieldTypeRequiredDescription
orgSlugstringYesOrganization ID.
taskIdsinteger[]YesTask IDs.
operateinteger (enum)YesOperate type.
{ "orgSlug": "<organization-id>", "taskIds": [45], "operate": 1 }

Response: { "success": true }. HTTP 400 means that the task state does not allow the operation, for example task #45 orders_sync can only start from stopped (current: TaskRunning). The server operates the tasks in the given order and stops at the first error. The tasks before the failed one keep their new state. Read message to find the failed task.

List Task Runs​

POST /api/v2/data-integration/task/runs · Read · Member

Returns task runs, from the newest run. A run starts each time the task starts.

FieldTypeRequiredDescription
orgSlugstringYesOrganization ID.
taskIdintegerNoFilter by task ID. Without it, the response lists the runs of all tasks in the organization.
pageintegerNoPage number. Default: 1.
perPageintegerNoRows per page. Default: 20.

Response example. status is a task run status. responseData is the last run data of the run. taskSnapshot is a JSON string with the task settings at run time.

{
"success": true,
"data": {
"total": 3,
"page": 1,
"perPage": 20,
"list": [
{
"id": 902,
"orgId": "1024",
"taskId": 45,
"taskName": "orders_sync",
"executeId": "a9f3c2e1",
"status": 1,
"responseData": { "kind": "mysql", "status": 1, "mysqlLastRun": { "phase": "cdc", "tablesTotal": 1, "tablesCompleted": 1, "rowsSynced": "1203344" } },
"createdAt": "2026-11-09T07:00:00Z",
"updatedAt": "2026-11-09T08:00:00Z"
}
]
}
}

Get Task Run Details​

POST /api/v2/data-integration/task/runs/{executeId} · Read · Member

Returns the status reports of one run.

ParameterInTypeRequiredDescription
executeIdpathstringYesexecuteId of a run.
orgSlugbodystringYesOrganization ID.

Response example. requestData is a JSON string with the request that started the run.

{
"success": true,
"data": {
"total": 1,
"list": [
{
"id": 5521,
"taskId": 45,
"executeId": "a9f3c2e1",
"status": 3,
"hostname": "dataintegration-worker-0",
"responseCode": 500,
"responseData": { "kind": "mysql", "status": 3, "error": "Access denied for user 'sync'@'203.0.113.10'" },
"createdAt": "2026-11-09T07:00:05Z"
}
]
}
}

List MySQL Snapshot Table Results​

POST /api/v2/data-integration/task/runs/{executeId}/mysql/snapshot/tables · Read · Member

Returns the result of each table in the snapshot of a MySQL run. Results are available when the run has mysqlLastRun.tableResultsAvailable: true.

ParameterInTypeRequiredDescription
executeIdpathstringYesexecuteId of a run.
orgSlugbodystringYesOrganization ID.
statusbodyinteger (enum)NoFilter by MySQL snapshot table status.
pagebodyintegerNoPage number. Default: 1.
perPagebodyintegerNoRows per page. Default: 20. Maximum: 100. A larger value returns HTTP 400.
{
"success": true,
"data": {
"total": 2,
"page": 1,
"perPage": 20,
"list": [
{ "database": "shop", "table": "orders", "fullName": "shop.orders", "status": 1, "rowsRead": "1200000" },
{ "database": "shop", "table": "logs", "fullName": "shop.logs", "status": 3, "error": "no primary key and no conflictKey" }
]
}
}

List TiDB Full Sync Table Results​

POST /api/v2/data-integration/task/runs/{executeId}/tidb/full-sync/tables · Read · Member

Same as List MySQL Snapshot Table Results, for the full sync of a TiDB run. status is a TiDB full sync table status. Each item has totalChunks and completedChunks instead of rowsRead.

{
"success": true,
"data": {
"total": 1,
"list": [
{ "database": "app", "table": "users", "fullName": "app.users", "status": 1, "totalChunks": 12, "completedChunks": 12 }
]
}
}

Get TiDB Task Metrics​

POST /api/v2/data-integration/task/{taskId}/metrics · Read · Member

Returns fixed sync metrics of a TiDB task (serviceId 6) over a time range.

ParameterInTypeRequiredDescription
taskIdpathintegerYesID of a TiDB task.
orgSlugbodystringYesOrganization ID.
frombodystringYesStart time, RFC 3339. Must be before to.
tobodystringYesEnd time, RFC 3339. Not more than 24 hours after from.
stepSecondsbodyintegerYesSeconds between points, from 30 to 3600. The range can have at most 1440 points.

Request example:

{ "orgSlug": "<organization-id>", "from": "2026-11-09T07:00:00Z", "to": "2026-11-09T08:00:00Z", "stepSeconds": 60 }

Response example. time values are Unix seconds. A null value means that there is no sample at that time. latest is the value of the last point, and it is missing if that point has no sample.

{
"success": true,
"data": {
"resultType": "matrix",
"time": [1762671600, 1762671660],
"series": [
{ "metric": "cdc_freshness_seconds", "time": [1762671600, 1762671660], "value": [4, 5], "latest": 5 },
{ "metric": "cdc_merged_rows_per_second", "time": [1762671600, 1762671660], "value": [120.5, null] }
]
}
}

Metric names:

MetricDescription
cdc_freshness_secondsDelay of the last successful merge, in seconds.
cdc_source_rows_per_secondSource change events per second.
cdc_merged_rows_per_secondRows merged into Databend per second.
cdc_table_healthy_percentPercent of CDC tables without errors.
cdc_error_tablesCDC tables in the error state.
cdc_backoff_tablesCDC tables that wait to retry.
cdc_permanent_error1 if the CDC run has a permanent error.
cdc_running1 if CDC runs.
cdc_sample_age_secondsAge of the last metric sample.
cdc_run_success_percentPercent of successful CDC runs in the last 24 hours.
snapshot_rows_per_secondSnapshot rows loaded per second.
snapshot_table_success_percentPercent of snapshot tables without errors.
snapshot_progress_percentSnapshot progress.
snapshot_running1 if the snapshot runs.
snapshot_run_success_percentPercent of successful snapshot runs in the last 24 hours.

Get Sync Metrics​

GET /api/v1/orgs/{orgSlug}/tenant/metrics/{queryType} · Read · Member

Returns the sync metrics of a MySQL or TiDB task. This endpoint is the Get Metrics endpoint with queryType set to MySQLSync or TiDBSync. Use it for MySQL tasks. For TiDB tasks, you can also use Get TiDB Task Metrics.

ParameterInTypeRequiredDescription
orgSlugpathstringYesOrganization ID.
queryTypepathstring (enum)YesMySQLSync or TiDBSync. It must match the task type.
taskIdqueryintegerYesTask ID.
fromquerystringYesStart time, RFC 3339.
toquerystringYesEnd time, RFC 3339. Not more than 24 hours after from.
stepquerystringYesDuration from 30s to 1h, in whole seconds. The range can have at most 1440 points.
curl --get 'https://api.databend.com/api/v1/orgs/<organization-id>/tenant/metrics/MySQLSync' \
--header 'X-DATABENDCLOUD-TOKEN: <api-token>' \
--data-urlencode 'taskId=<task-id>' \
--data-urlencode 'from=2026-11-09T07:00:00Z' \
--data-urlencode 'to=2026-11-09T08:00:00Z' \
--data-urlencode 'step=60s'

The response has the same shape as Get Metrics. The metric names are the same as Get TiDB Task Metrics. MySQL tasks also return cdc_source_lag_seconds (how far the binlog reader is behind the source) and cdc_skipped_tables. MySQL tasks do not return cdc_error_tables or cdc_backoff_tables.

Types​

Task Status​

ValueName
1TaskStopped
2TaskRunning

Task Run Status​

ValueName
1TaskRunRunning
2TaskRunSuccess
3TaskRunFail

Operate Type​

ValueNameEffect
1StartStarts a stopped task.
2StopStops a running task. A stopped task stays stopped.
3DropDeletes a stopped task. Returns HTTP 400 if the task is running.
4ResumeStarts a stopped task. A MySQL archive task keeps its current time window, so a failed window runs again.
5CancelStops a running task. Returns HTTP 400 if the task is not running.

Sync Mode​

mysqlTask.syncMode, postgresTask.syncMode, and tidbTask.syncMode use the same values.

ValueModecontinuousIngestion
1Snapshot only.0
2CDC only.1
3Snapshot, then CDC.1

File Type​

ValueFormat
1CSV
2Parquet
3NDJSON

Copy On Error​

awsS3File.copyIntoOnError:

ValueEffect
1CONTINUE: skip bad rows and continue.
2ABORT: stop the load at the first error.

MySQL Archive Mode​

mysqlTask.archiveSchedule.archiveMode: 1 daily, 2 weekly, 3 monthly.

MySQL Snapshot Table Status​

ValueNameMeaning
1SuccessAll rows of the table are loaded.
2FailedThe table failed after all retries.
3SkippedThe table has no usable merge key. The run left it out.
4PendingThe run ended before the snapshot reached the table.

TiDB Full Sync Table Status​

1 success, 2 failed.

Task Objects​

TableField​

FieldTypeRequiredDescription
namestringYesColumn name.
typestringYesDatabend data type, for example VARCHAR, BIGINT, TIMESTAMP, or VARIANT.
nullablebooleanNoWhether the column accepts NULL.
defaultValuestringNoDefault value expression.

AwsS3File​

Used by S3, SQS (S3), and MNS (OSS) tasks.

FieldTypeRequiredDescription
regionstringNoBucket region, for example us-east-2.
filePathstringDependsFiles to load. Required for S3 (serviceId 1). Wildcards are allowed: s3://bucket/path/2026-11-*.csv. SQS (S3) and MNS (OSS) tasks get the files from event messages.
fileTypeinteger (enum)YesFile type. The server does not check it when you create the task. Always set it.
fileCsvArgsobjectFor CSVFileCsvArgs.
copyIntoOnErrorinteger (enum)NoCopy on error.
copyIntoPurgebooleanNoDelete the source files after a successful load.
copyIntoForcebooleanNoLoad files again even if they were loaded before.

FileCsvArgs​

FieldTypeRequiredDescription
fieldDelimiterstringNoDefault: ,.
recordDelimiterstringNoDefault: \n.
compressionstringNoDefault: None. Other values follow the Databend COMPRESSION file format option, for example GZIP or AUTO.
skipHeaderintegerNoNumber of header lines to skip.

KafkaConsumerArgs (Task)​

The task part of the Kafka settings. The connection is on the data source.

FieldTypeRequiredDescription
topicsstringYesTopics, separated by commas.
dataFormatstringNoOnly JSON. Default: JSON.
offsetResetstring (enum)NoEARLIEST or LATEST. Default: LATEST.
maxBatchSizeBytesintegerNoMaximum size of one output file, in bytes. Default: 16777216.
maxBatchWaitSecondsintegerNoMaximum wait before the task writes a file. Default: 60.

MysqlTaskArgs​

FieldTypeRequiredDescription
syncModeinteger (enum)YesSync mode.
includeTablesstring[]DependsTables in the default database of the data source. Required if you do not use tableRules.
excludeTablesstring[]NoTables to leave out. Use only with includeTables.
tableRulesstring[]DependsTable rules for one or more databases. Up to 50 rules. Do not use with includeTables, excludeTables, or archiveSchedule. The request tableName must be empty.
conflictKeystringDependsMerge key column. Required for CDC modes (2, 3) when you use includeTables. With tableRules, each table uses its primary key, and conflictKey is an optional override for tables without a composite key.
allowDeletebooleanNoApply source DELETE events to the target.
snapshotWhereConditionstringNoSQL condition to filter snapshot rows. Only for syncMode 1. At most 10,000 characters. It must not contain DROP, DELETE, UPDATE, INSERT, TRUNCATE, EXEC, EXECUTE, CREATE, ALTER, GRANT, or REVOKE.
archiveScheduleobjectNoPeriodic archive. See below. Only with includeTables.
maxMatchedTablesintegerNoMost tables that tableRules can match. 0 uses the server default (5000).
targetDatabasePrefix, targetDatabaseSuffix, targetTablePrefix, targetTableSuffixstringNoName affixes for rule-based tasks. Letters, digits, and _ only. Target database = prefix + source database + suffix. Target table = prefix + source table + suffix.
mergeIntervalSeconds, rawTableTtlHours, checkpointIntervalSeconds, pipelineBufferSize, pipelineBatchSize, pipelineFlushIntervalSeconds, pipelineWorkers, batchSizeintegerNoAdvanced tuning. Omit them or send 0 to use the server defaults.

archiveSchedule fields:

FieldTypeRequiredDescription
enabledbooleanYesTurn on the archive.
cronExpressionstringIf enabledCron expression, for example 0 1 * * *.
archiveModeinteger (enum)If enabledMySQL archive mode.
timeColumnNamestringIf autoGenerateConditionTime column. Letters, digits, and _, at most 64 characters.
autoGenerateConditionbooleanNoGenerate the time window condition from timeColumnName.
timezonestringNoIANA time zone, for example Asia/Shanghai. Default: UTC.

PostgresTaskArgs​

FieldTypeRequiredDescription
syncModeinteger (enum)YesSync mode.
includeTablesstring[]YesTables, for example public.orders.
excludeTablesstring[]NoTables to leave out.
conflictKeystringDependsMerge key column. Required for syncMode 2 and 3.
allowDeletebooleanNoApply source DELETE events to the target.
snapshotWhereConditionstringNoSame rules as in MysqlTaskArgs. Only for syncMode 1.
Tuning fieldsintegerNoSame as in MysqlTaskArgs.

TiDBTaskArgs​

FieldTypeRequiredDescription
syncModeinteger (enum)YesSync mode.
dumplingS3PrefixstringDependsPrefix of the Dumpling export. Required for syncMode 1 and 3.
changefeedS3PrefixstringDependsPrefix that the TiCDC changefeed writes to. Required for syncMode 2 and 3. Create the changefeed with enable-tidb-extension=true in its sink URI.
tableRulesstring[]DependsTable rules. Up to 50 rules. Required if the data source has no database. Do not use with includeTables or excludeTables.
includeTables, excludeTablesstring[]NoTables in the default database of the data source.
maxMatchedTablesintegerNoMost tables that the task can sync. 0 uses the server default (5000).
targetDatabasePrefix, targetDatabaseSuffix, targetTablePrefix, targetTableSuffixstringNoName affixes. Letters, digits, and _ only. With no affixes, the target names are the source names.
conflictKeystringNoMerge key column.
allowDeletebooleanNoApply source DELETE events to the target.
textToVariantbooleanNoMap TEXT columns to VARIANT instead of STRING. Set it before the first sync. Values must be valid JSON.
dumplingEscapeBackslashbooleanDependsMust match the --escape-backslash option of the Dumpling export. A non-empty export with text columns needs false, exported with --escape-backslash=false --csv-output-dialect=snowflake.
dumplingCsvSeparatorstringNoCSV separator of the export.
dumplingCsvNullstringNoNULL marker of the export.
dumplingCsvSkipHeaderintegerNoHeader lines in each file. Omit it to use the Dumpling default (one header line).
dumplingAutoCreateTablebooleanNoCreate target tables from the exported schema files.
dumplingOnErrorstringNoCOPY INTO ON_ERROR option for the snapshot.
dumplingPurgebooleanNoDelete export files after a successful load.
dumplingCopyBatchFilesintegerNoFiles per COPY, from 0 to 64. 0 uses 16.
pollIntervalSeconds, batchFileCount, mergeIntervalSeconds, tableParallelismintegerNoAdvanced tuning. Must not be negative. 0 uses the server default.
errorIntegrationstringNoNot available on Databend Cloud. Do not set it. The server rejects a value with HTTP 400.

Table Rules​

tableRules uses the TiCDC filter syntax. Each rule is schemaPattern.tablePattern. A rule that starts with ! excludes objects.

RuleMatches
app.ordersOne table.
shard_*.*All tables in all databases whose names start with shard_.
~^shard_\d+$.~^tRegular expressions on both sides.
!*.tmp_*Excludes tables whose names start with tmp_.

The server reads rules from the last one to the first. The first rule that matches decides. An object that matches no rule is excluded. A list of only ! rules starts with an implicit *.*. Use Preview MySQL Table Rules or Preview TiDB Table Rules to check the result before you create a task.

Last Run Data​

lastRunData (on a task) and responseData (on a run) have this shape:

FieldTypeDescription
kindstringTask kind, for example mysql.
statusinteger (enum)Task run status.
errorstringError message of a failed run.
warningstringLatest warning that did not stop the run, for example a skipped file.
mysqlLastRun, postgresLastRun, tidbLastRun, kafkaLastRun, awsS3LastRun, awsSqsS3LastRunobjectProgress details for the task kind. Only one is present.

Useful progress fields:

ObjectFields
mysqlLastRunphase (snapshot or cdc), rowsSynced, insertCount, updateCount, deleteCount, mergedRows, tablesTotal, tablesCompleted, tablesError, tablesSkipped, currentTable, rowsPerSecond, dataFressness (seconds), sourceLagSeconds, lastError, lastWarning, tableResultsAvailable
postgresLastRunlsn, snapshotCompleted, rowsSynced, insertCount, updateCount, deleteCount, lastMessage
tidbLastRunfullSyncPhase, fullSyncCompleted, rowsSynced, bytesSynced, chunksTotal, chunksCompleted, tablesTotal, tablesActive, tablesError, tablesBackoff, mergedRows, dataFressness (seconds), appliedResolvedTS, slowestTable, lastError, lastWarning, tableResultsAvailable
kafkaLastRunwindowStart, windowEnd, recordsReceived, recordsWritten, recordsFailed, bytesReceived, bytesWritten, errorCount
awsS3LastRun, awsSqsS3LastRunbucket, object, total, success, fail

64-bit counters are JSON strings. dataFressness keeps its original spelling.