From 1f84dee7c41209746b9c5230fc389dc4524cb737 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 17 Oct 2023 11:06:29 +0800 Subject: [PATCH] Update ticdc canal json doc (#14943) (#15089) --- ticdc/ticdc-canal-json.md | 8 ++++---- ticdc/ticdc-open-api-v2.md | 23 ++++++++++++----------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ticdc/ticdc-canal-json.md b/ticdc/ticdc-canal-json.md index acc59c5a2fe07..d01b197f96852 100644 --- a/ticdc/ticdc-canal-json.md +++ b/ticdc/ticdc-canal-json.md @@ -301,10 +301,10 @@ For example, the following 16 bytes `[5 7 10 15 36 50 43 99 120 60 38 255 254 45 The way that TiCDC implements the Canal-JSON data format, including the `Update` Event and the `mysqlType` field, differs from the official Canal. The following table shows the main differences. -| Item | TiCDC Canal-JSON | Canal | -|:----------------|:-------------------------|:-------------------------------------| -| Event of `Update` Type | The `old` field contains all the column data | The `old` field contains only the modified column data | -| `mysqlType` field | For types with parameters, it does not contain the information of the type parameter | For types with parameters, it contains the full information of the type parameter | +| Item | TiCDC Canal-JSON | Canal | +|:----------------|:---------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------| +| Event of `Update` Type | By default, the `old` field contains all the column data. When `only_output_updated_columns` is `true`, the `old` field contains only the modified column data. | The `old` field contains only the modified column data | +| `mysqlType` field | For types with parameters, it does not contain the information of the type parameter | For types with parameters, it contains the full information of the type parameter | ### Event of `Update` Type diff --git a/ticdc/ticdc-open-api-v2.md b/ticdc/ticdc-open-api-v2.md index f8e5ac77c6b84..9f258f389d5b6 100644 --- a/ticdc/ticdc-open-api-v2.md +++ b/ticdc/ticdc-open-api-v2.md @@ -321,17 +321,18 @@ The `mounter` parameter is described as follows: The `sink` parameters are described as follows: -| Parameter name | Description | -|:-----------------|:---------------------------------------| -| `column_selectors` | The column selector configuration. (Optional) | -| `csv` | The CSV configuration. (Optional) | -| `date_separator` | `STRING` type. Indicates the date separator type of the file directory. Value options are `none`, `year`, `month`, and `day`. `none` is the default value and means that the date is not separated. (Optional) | -| `dispatchers` | An configuration array for event dispatching. (Optional) | -| `encoder_concurrency` | `INT` type. The number of encoder threads in the MQ sink. The default value is `16`. (Optional) | -| `protocol` | `STRING` type. For MQ sinks, you can specify the protocol format of the message. The following protocols are currently supported: `canal-json`, `open-protocol`, `canal`, `avro`, and `maxwell`. | -| `schema_registry` | `STRING` type. The schema registry address. (Optional) | -| `terminator` | `STRING` type. The terminator is used to separate two data change events. The default value is null, which means `"\r\n"` is used as the terminator. (Optional) | -| `transaction_atomicity` | `STRING` type. The atomicity level of the transaction. (Optional) | +| Parameter name | Description | +|:-----------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `column_selectors` | The column selector configuration. (Optional) | +| `csv` | The CSV configuration. (Optional) | +| `date_separator` | `STRING` type. Indicates the date separator type of the file directory. Value options are `none`, `year`, `month`, and `day`. `none` is the default value and means that the date is not separated. (Optional) | +| `dispatchers` | An configuration array for event dispatching. (Optional) | +| `encoder_concurrency` | `INT` type. The number of encoder threads in the MQ sink. The default value is `16`. (Optional) | +| `protocol` | `STRING` type. For MQ sinks, you can specify the protocol format of the message. The following protocols are currently supported: `canal-json`, `open-protocol`, `canal`, `avro`, and `maxwell`. | +| `schema_registry` | `STRING` type. The schema registry address. (Optional) | +| `terminator` | `STRING` type. The terminator is used to separate two data change events. The default value is null, which means `"\r\n"` is used as the terminator. (Optional) | +| `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`. | `sink.column_selectors` is an array. The parameters are described as follows: