hailin0 commented on code in PR #8086:
URL: https://github.com/apache/seatunnel/pull/8086#discussion_r1862117375


##########
docs/en/connector-v2/sink/Clickhouse.md:
##########
@@ -59,8 +59,69 @@ They can be downloaded via install-plugin.sh or from the 
Maven central repositor
 | primary_key                           | String  | No       | -       | Mark 
the primary key column from clickhouse table, and based on primary key execute 
INSERT/UPDATE/DELETE to clickhouse table.                                       
                                                                                
                                                        |
 | support_upsert                        | Boolean | No       | false   | 
Support upsert row by query primary key.                                        
                                                                                
                                                                                
                                                            |
 | allow_experimental_lightweight_delete | Boolean | No       | false   | Allow 
experimental lightweight delete based on `*MergeTree` table engine.             
                                                                                
                                                                                
                                                      |
+| schema_save_mode               | Enum    | no       | 
CREATE_SCHEMA_WHEN_NOT_EXIST | Schema save mode. Please refer to the 
`schema_save_mode` section below.                                               
                                        |
+| data_save_mode                 | Enum    | no       | APPEND_DATA            
      | Data save mode. Please refer to the `data_save_mode` section below.     
                                                                                
    |
+| save_mode_create_template      | string  | no       | see below              
      | See below.                                                              
                                                                                
    |
 | common-options                        |         | No       | -       | Sink 
plugin common parameters, please refer to [Sink Common 
Options](../sink-common-options.md) for details.                                
                                                                                
                                                                                
|
 
+### schema_save_mode[Enum]
+
+Before starting the synchronization task, choose different processing options 
for the existing table schema.  
+Option descriptions:  
+`RECREATE_SCHEMA`: Create the table if it does not exist; drop and recreate 
the table when saving.  
+`CREATE_SCHEMA_WHEN_NOT_EXIST`: Create the table if it does not exist; skip if 
the table already exists.  
+`ERROR_WHEN_SCHEMA_NOT_EXIST`: Throw an error if the table does not exist.  
+`IGNORE`: Ignore the processing of the table.
+
+### data_save_mode[Enum]
+
+Before starting the synchronization task, choose different processing options 
for the existing data on the target side.  
+Option descriptions:  
+`DROP_DATA`: Retain the database schema but delete the data.  
+`APPEND_DATA`: Retain the database schema and the data.  
+`CUSTOM_PROCESSING`: Custom user-defined processing.  
+`ERROR_WHEN_DATA_EXISTS`: Throw an error if data exists.
+
+### save_mode_create_template
+
+Automatically create Doris tables using templates.  
+The table creation statements will be generated based on the upstream data 
types and schema. The default template can be modified as needed.
+
+Default template:
+```sql
+CREATE TABLE IF NOT EXISTS `${database}`.`${table_name}` (
+    ${rowtype_primary_key},
+    ${rowtype_fields}
+) ENGINE = MergeTree()
+ORDER BY (${rowtype_primary_key})
+PRIMARY KEY (${rowtype_primary_key})
+SETTINGS
+    index_granularity = 8192;
+```
+
+If custom fields are added to the template, for example, adding an `id` field:
+
+```sql
+CREATE TABLE IF NOT EXISTS `${database}`.`${table_name}` (

Review Comment:
   Use `${table}`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to