From 57413d444facc495ea91b13839ac8b0e66e003f0 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 17 Jul 2025 13:38:44 +0800 Subject: [PATCH 1/7] Add temp.md --- temp.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 temp.md diff --git a/temp.md b/temp.md new file mode 100644 index 0000000000000..af27ff4986a7b --- /dev/null +++ b/temp.md @@ -0,0 +1 @@ +This is a test file. \ No newline at end of file From 3b44a279121ead3a1906419d82d64a58075efe64 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 17 Jul 2025 13:38:47 +0800 Subject: [PATCH 2/7] Delete temp.md --- temp.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 temp.md diff --git a/temp.md b/temp.md deleted file mode 100644 index af27ff4986a7b..0000000000000 --- a/temp.md +++ /dev/null @@ -1 +0,0 @@ -This is a test file. \ No newline at end of file From 92b859c629d005b1189935c391180c4a69bd9848 Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 17 Jul 2025 13:46:49 +0800 Subject: [PATCH 3/7] Update ticdc-csv.md --- ticdc/ticdc-csv.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ticdc/ticdc-csv.md b/ticdc/ticdc-csv.md index 40d6de9161fb8..b8fd562bff82d 100644 --- a/ticdc/ticdc-csv.md +++ b/ticdc/ticdc-csv.md @@ -28,6 +28,7 @@ quote = '"' null = '\N' include-commit-ts = true output-old-value = false +output-field-header = false ``` ## Transactional constraints @@ -51,6 +52,12 @@ In the CSV file, each column is defined as follows: - Column 5: The `is-update` column only exists when the value of `output-old-value` is true, which is used to identify whether the row data change comes from the UPDATE event (the value of the column is true) or the INSERT/DELETE event (the value is false). - Column 6 to the last column: One or more columns with data changes. +When `output-field-header = true`, the CSV file includes a header row. The column names in the header row are as follows: + +| Column 1 | Column 2 | Column 3 | Column 4 (optional) | Column 5 (optional) | Column 6 | ... | Last column | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `ticdc-meta$operation` | `ticdc-meta$table` | `ticdc-meta$schema` | `ticdc-meta$commit-ts` | `ticdc-meta$is-update` | The first column with data changes | ... | The last column with data changes | + Assume that table `hr.employee` is defined as follows: ```sql @@ -85,6 +92,19 @@ When `include-commit-ts = true` and `output-old-value = true`, the DML events of "I","employee","hr",433305438660591630,true,102,"Alex","Alice","2018-06-15","Beijing" ``` +When `include-commit-ts = true`, `output-old-value = true`, and `output-field-header = true`, the DML events of this table are stored in the CSV format as follows: + +``` +ticdc-meta$operation,ticdc-meta$table,ticdc-meta$schema,ticdc-meta$commit-ts,ticdc-meta$is-update,Id,LastName,FirstName,HireDate,OfficeLocation +"I","employee","hr",433305438660591626,false,101,"Smith","Bob","2014-06-04","New York" +"D","employee","hr",433305438660591627,true,101,"Smith","Bob","2015-10-08","Shanghai" +"I","employee","hr",433305438660591627,true,101,"Smith","Bob","2015-10-08","Los Angeles" +"D","employee","hr",433305438660591629,false,101,"Smith","Bob","2017-03-13","Dallas" +"I","employee","hr",433305438660591630,false,102,"Alex","Alice","2017-03-14","Shanghai" +"D","employee","hr",433305438660591630,true,102,"Alex","Alice","2017-03-14","Beijing" +"I","employee","hr",433305438660591630,true,102,"Alex","Alice","2018-06-15","Beijing" +``` + ## Data type mapping | MySQL type | CSV type | Example | Description | From 0a9fc974db08c8db76e728c2b80954d6c4ef10b0 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 23 Jul 2025 14:15:53 +0800 Subject: [PATCH 4/7] Update ticdc/ticdc-csv.md --- ticdc/ticdc-csv.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ticdc/ticdc-csv.md b/ticdc/ticdc-csv.md index b8fd562bff82d..a65e9392f179b 100644 --- a/ticdc/ticdc-csv.md +++ b/ticdc/ticdc-csv.md @@ -28,7 +28,7 @@ quote = '"' null = '\N' include-commit-ts = true output-old-value = false -output-field-header = false +output-field-header = false # New in v9.0.0 ``` ## Transactional constraints From 6c4054fb24fadc87014a790bae4c809a04a6a7e9 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 12 Aug 2025 14:02:51 +0800 Subject: [PATCH 5/7] Update ticdc/ticdc-csv.md Co-authored-by: Aolin --- ticdc/ticdc-csv.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ticdc/ticdc-csv.md b/ticdc/ticdc-csv.md index a65e9392f179b..8bd85763b187d 100644 --- a/ticdc/ticdc-csv.md +++ b/ticdc/ticdc-csv.md @@ -94,7 +94,7 @@ When `include-commit-ts = true` and `output-old-value = true`, the DML events of When `include-commit-ts = true`, `output-old-value = true`, and `output-field-header = true`, the DML events of this table are stored in the CSV format as follows: -``` +```csv ticdc-meta$operation,ticdc-meta$table,ticdc-meta$schema,ticdc-meta$commit-ts,ticdc-meta$is-update,Id,LastName,FirstName,HireDate,OfficeLocation "I","employee","hr",433305438660591626,false,101,"Smith","Bob","2014-06-04","New York" "D","employee","hr",433305438660591627,true,101,"Smith","Bob","2015-10-08","Shanghai" From e6b379f85c3edabb9b82519a1b5e0c1ba0cb443f Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 3 Dec 2025 17:10:09 +0800 Subject: [PATCH 6/7] Update ticdc/ticdc-csv.md --- ticdc/ticdc-csv.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ticdc/ticdc-csv.md b/ticdc/ticdc-csv.md index 8bd85763b187d..4bf9ade7c6c1c 100644 --- a/ticdc/ticdc-csv.md +++ b/ticdc/ticdc-csv.md @@ -28,7 +28,7 @@ quote = '"' null = '\N' include-commit-ts = true output-old-value = false -output-field-header = false # New in v9.0.0 +output-field-header = false # New in v8.5.5 ``` ## Transactional constraints From 124d8be3fc92c58a57b5c8115af1682eab1b32a4 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 13 Jan 2026 14:29:51 +0800 Subject: [PATCH 7/7] Update ticdc/ticdc-csv.md --- ticdc/ticdc-csv.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ticdc/ticdc-csv.md b/ticdc/ticdc-csv.md index 4bf9ade7c6c1c..700e01d322204 100644 --- a/ticdc/ticdc-csv.md +++ b/ticdc/ticdc-csv.md @@ -28,7 +28,7 @@ quote = '"' null = '\N' include-commit-ts = true output-old-value = false -output-field-header = false # New in v8.5.5 +output-field-header = false # New in v8.5.6 ``` ## Transactional constraints