Skip to content

Commit

Permalink
Do not merge until v7.1.2: cdc: add hex encoding to csv (#14692) (#14708
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ti-chi-bot authored Oct 25, 2023
1 parent 2f671ec commit 1ade9e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ticdc/ticdc-changefeed-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ enable-partition-separator = true
# null = '\N'
# 是否在 CSV 行中包含 commit-ts。默认值为 false。
# include-commit-ts = false
# 二进制类型数据的编码方式,可选 'base64' 或 'hex'。从 v7.1.2 开始支持。默认值为 'base64'。
# binary-encoding-method = 'base64'

# consistent 中的字段用于配置 Changefeed 的数据一致性。详细的信息,请参考 <https://docs.pingcap.com/tidb/stable/ticdc-sink-to-mysql#eventually-consistent-replication-in-disaster-scenarios>。
# 注意:一致性相关参数只有当下游为数据库并且开启 redo log 功能时,才会生效。
Expand Down
3 changes: 2 additions & 1 deletion ticdc/ticdc-csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ delimiter = ','
quote = '"'
null = '\N'
include-commit-ts = true
binary-encoding-method = 'base64'
```

## 数据保存的事务性约束
Expand Down Expand Up @@ -89,7 +90,7 @@ CREATE TABLE `employee` (
| `TIME` | String | `"23:59:59"` | 格式:`HH:mm:ss` |
| `YEAR` | Integer | `1970` | - |
| `VARCHAR`/`JSON`/`TINYTEXT`/`MEDIUMTEXT`/`LONGTEXT`/`TEXT`/`CHAR` | String | `"test"` | 以 UTF-8 编码输出 |
| `VARBINARY`/`TINYBLOB`/`MEDIUMBLOB`/`LONGBLOB`/`BLOB`/`BINARY` | String | `"6Zi/5pav"` | 以 Base64 编码输出 |
| `VARBINARY`/`TINYBLOB`/`MEDIUMBLOB`/`LONGBLOB`/`BLOB`/`BINARY` | String | `"6Zi/5pav"` `"e998bfe696af"` | 以 Base64 或 Hex 编码输出 |
| `BIT` | Integer | `81` | - |
| `DECIMAL` | String | `"129012.1230000"` | - |
| `ENUM` | String | `"a"` | - |
Expand Down

0 comments on commit 1ade9e5

Please sign in to comment.