Skip to content

Commit

Permalink
ticdc add output old value config (#17366)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreoxmt committed May 13, 2024
1 parent 772a4b1 commit 4d68bac
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ticdc/ticdc-changefeed-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,14 @@ enable-partition-separator = true
# The default value is "json".
# encoding-format = "json"

[sink.open]
# Whether to output the value before the row data changes. The default value is true. When it is disabled, the UPDATE event does not output the "p" field.
# output-old-value = true

[sink.debezium]
# Whether to output the value before the row data changes. The default value is true. When it is disabled, the UPDATE event does not output the "before" field.
# output-old-value = true

# Specifies the replication consistency configurations for a changefeed when using the redo log. For more information, see https://docs.pingcap.com/tidb/stable/ticdc-sink-to-mysql#eventually-consistent-replication-in-disaster-scenarios.
# Note: The consistency-related configuration items only take effect when the downstream is a database and the redo log feature is enabled.
[consistent]
Expand Down
16 changes: 15 additions & 1 deletion ticdc/ticdc-open-api-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ The `sink` parameters are described as follows:
| `transaction_atomicity` | `STRING` type. The atomicity level of the transaction. (Optional) |
| `only_output_updated_columns` | `BOOLEAN` type. For MQ sinks using the `canal-json` or `open-protocol` protocol, you can specify whether only output the modified columns. The default value is `false`. (Optional) |
| `cloud_storage_config` | The storage sink configuration. (Optional) |
| `open` | The Open Protocol configuration. (Optional) |
| `debezium` | The Debezium Protocol configuration. (Optional) |

`sink.column_selectors` is an array. The parameters are described as follows:

Expand Down Expand Up @@ -349,7 +351,7 @@ The `sink.csv` parameters are described as follows:
| `partition` | `STRING` type. The target partition for dispatching events. |
| `topic` | `STRING` type. The target topic for dispatching events. |

`sink.cloud_storage_config` parameters are described as follows:
`sink.cloud_storage_config` parameters are described as follows:

| Parameter name | Description |
|:-----------------|:---------------------------------------|
Expand All @@ -360,6 +362,18 @@ The `sink.csv` parameters are described as follows:
| `file_cleanup_cron_spec` | `STRING` type. The running cycle of the scheduled cleanup task, compatible with the crontab configuration, with a format of `<Second> <Minute> <Hour> <Day of the month> <Month> <Day of the week (Optional)>`. |
| `flush_concurrency` | `INT` type. The concurrency for uploading a single file. |

`sink.open` parameters are described as follows:

| Parameter name | Description |
|:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `output_old_value` | `BOOLEAN` type. It controls whether to output the value before the row data changes. The default value is `true`. When it is disabled, the UPDATE event does not output the "p" field. |

`sink.debezium` parameters are described as follows:

| Parameter name | Description |
|:-------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `output_old_value` | `BOOLEAN` type. It controls whether to output the value before the row data changes. The default value is true. When it is disabled, the UPDATE event does not output the "before" field. |

### Example

The following request creates a replication task with an ID of `test5` and `sink_uri` of `blackhome://`.
Expand Down

0 comments on commit 4d68bac

Please sign in to comment.