Hisoka-X commented on code in PR #3416:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3416#discussion_r1022297132


##########
seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/ClickhouseFileSinkWriter.java:
##########
@@ -164,17 +177,17 @@ private List<String> 
generateClickhouseLocalFiles(List<SeaTunnelRow> rows) throw
         command.add("\"" + "temp_table" + uuid + "\"");
         command.add("-q");
         command.add(String.format(
-                "\"%s; INSERT INTO TABLE %s SELECT %s FROM temp_table%s;\"",
-                
clickhouseTable.getCreateTableDDL().replace(clickhouseTable.getDatabase() + 
".", "").replaceAll("`", ""),
-                clickhouseTable.getLocalTableName(),
-                readerOption.getTableSchema().keySet().stream().map(s -> {
-                    if (readerOption.getFields().contains(s)) {
-                        return s;
-                    } else {
-                        return "NULL";
-                    }
-                }).collect(Collectors.joining(",")),
-                uuid));
+            "\"%s; INSERT INTO TABLE %s SELECT %s FROM temp_table%s;\"",
+            
clickhouseTable.getCreateTableDDL().replace(clickhouseTable.getDatabase() + 
".", "").replaceAll("`", ""),
+            clickhouseTable.getLocalTableName(),
+            readerOption.getTableSchema().keySet().stream().map(s -> {
+                if (readerOption.getFields().contains(s)) {
+                    return s;
+                } else {
+                    return "NULL";
+                }
+            }).collect(Collectors.joining(",")),
+            uuid));
         command.add("--path");

Review Comment:
   This information very helpful! Maybe we should create an parameter to use 
config or `--path`



-- 
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