wineternity opened a new issue, #4034:
URL: https://github.com/apache/incubator-seatunnel/issues/4034

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   the split mode for clickhouse file sink v2 is always false. Thus for a 
distribute table,  it always write data to the first default shard, the data is 
not split neither by rand nor by hash.  Also the sharding_key config became 
useless.
   
   ### SeaTunnel Version
   
   2.3.0
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
     job.mode = "BATCH"
   }
   
   spark {
     spark.app.name = "hive2clickhouse_sanyu"
   }
   
   source {
       Hive {
         table_name = "sanyu.st_test230201"
         metastore_uri = 
"thrift://qabb-qa-metastore1:9083,thrift://qabb-qa-metastore2:9083"
   
       }
   }
   
   transform {
   
   }
   
   sink {
     Console {}
     ClickhouseFile {
       host = "qabb-qa-clickhouse101:8123,qabb-qa-clickhouse102:8123"
       database = "test"
       table = "test03_rand_dist"
       username = "default"
       password = "clickhouse"
       clickhouse_local_path = "/usr/bin/clickhouse-local"
       node_free_password = true
       node_pass = [{
          node_address = "qabb-qa-clickhouse101"
          username="clickhouse"
          password="1"
       },
       {
          node_address = "qabb-qa-clickhouse102"
          password="1"
          username="clickhouse"
       },
       {
          node_address = "10.215.99.209"
          password="1"
          username="clickhouse"
       },
       {
          node_address = "10.215.98.46"
          password="1"
          username="clickhouse"
       }]
       compatible_mode = true
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   apache-seatunnel-incubating-2.3.0/bin/start-seatunnel-spark-connector-v2.sh 
--master local --deploy-mode client --config seatunnel_test/job1.conf
   ```
   
   
   ### Error Exception
   
   ```log
   no error hadppened
   ```
   
   
   ### Flink or Spark Version
   
   Spark 2.4.8
   
   ### Java or Scala Version
   
   Java 8 and scala 2.11
   
   ### Screenshots
   
   
![image](https://user-images.githubusercontent.com/1088645/216254272-ab416cdd-6720-487b-aa16-b3b5a3e42a91.png)
   
![image](https://user-images.githubusercontent.com/1088645/216254364-7479b70a-fe92-4f4e-91ec-c86c09ae29ef.png)
   
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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