Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ticdc add output old value config #17366

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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_out_value` | `BOOLEAN` type. 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. |
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved

`sink.debezium` parameters are described as follows:

| Parameter name | Description |
|:-------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `output_out_value` | `BOOLEAN` type. 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. |
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved

### Example

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