From 2164f661bcd1b714c7fef7e3f900fce70088c0e9 Mon Sep 17 00:00:00 2001 From: LJ <97254796+DIDA-lJ@users.noreply.github.com> Date: Tue, 28 May 2024 20:00:42 +0800 Subject: [PATCH] [doc] Fix typo in mongo-cdc.md (#3413) --- docs/content/flink/cdc-ingestion/mongo-cdc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/flink/cdc-ingestion/mongo-cdc.md b/docs/content/flink/cdc-ingestion/mongo-cdc.md index 64cd5b43193c..17c70ba40418 100644 --- a/docs/content/flink/cdc-ingestion/mongo-cdc.md +++ b/docs/content/flink/cdc-ingestion/mongo-cdc.md @@ -119,13 +119,13 @@ Path Examples {{< generated/mongodb_path_example >}} -2. The synchronized table is required to have its primary key set as `_id`. +1. The synchronized table is required to have its primary key set as `_id`. This is because MongoDB's change events are recorded before updates in messages. Consequently, we can only convert them into Flink's UPSERT change log stream. The upstart stream demands a unique key, which is why we must declare `_id` as the primary key. Declaring other columns as primary keys is not feasible, as delete operations only encompass the _id and sharding key, excluding other keys and values. -3. MongoDB Change Streams are designed to return simple JSON documents without any data type definitions. This is because MongoDB is a document-oriented database, and one of its core features is the dynamic schema, where documents can contain different fields, and the data types of fields can be flexible. Therefore, the absence of data type definitions in Change Streams is to maintain this flexibility and extensibility. +2. MongoDB Change Streams are designed to return simple JSON documents without any data type definitions. This is because MongoDB is a document-oriented database, and one of its core features is the dynamic schema, where documents can contain different fields, and the data types of fields can be flexible. Therefore, the absence of data type definitions in Change Streams is to maintain this flexibility and extensibility. For this reason, we have set all field data types for synchronizing MongoDB to Paimon as String to address the issue of not being able to obtain data types. If the Paimon table you specify does not exist, this action will automatically create the table. Its schema will be derived from MongoDB collection.