wellbin-li opened a new issue, #5569:
URL: https://github.com/apache/seatunnel/issues/5569

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   hive sink ck, exception: Cannot set null to non-nullable colum
   
   ### SeaTunnel Version
   
   v2.3.3
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
     job.mode = "BATCH"
   }
   
   source {
     Hive {
       table_name = "hive_db.table1"
       sql = "select * from hive_db.table1"
       result_table_name = "res1"
       metastore_uri = "******:9083"
     }
   }
   
   transform {
   }
   
   sink {
     Clickhouse {
       host = "******:80"
       database = "ck_db"
       table = "table1_all"
       username = "user-clusters"
       password = "******"
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/start-seatunnel-spark-3-connector-v2.sh \
   --master local[4] \
   --deploy-mode client \
   --config ./config/seatunnel.streaming.conf.template
   ```
   
   
   ### Error Exception
   
   ```log
   Caused by: java.sql.SQLException: Cannot set null to non-nullable column #48 
[last_order_creation_date_with_outbound String]
        at 
com.clickhouse.jdbc.SqlExceptionUtils.clientError(SqlExceptionUtils.java:73)
        at 
com.clickhouse.jdbc.internal.InputBasedPreparedStatement.addBatch(InputBasedPreparedStatement.java:328)
        at 
org.apache.seatunnel.connectors.seatunnel.clickhouse.sink.client.executor.FieldNamedPreparedStatement.addBatch(FieldNamedPreparedStatement.java:371)
        at 
org.apache.seatunnel.connectors.seatunnel.clickhouse.sink.client.executor.SimpleBatchStatementExecutor.addToBatch(SimpleBatchStatementExecutor.java:43)
        at 
org.apache.seatunnel.connectors.seatunnel.clickhouse.sink.client.executor.BufferedBatchStatementExecutor.executeBatch(BufferedBatchStatementExecutor.java:51)
        at 
org.apache.seatunnel.connectors.seatunnel.clickhouse.sink.client.ClickhouseSinkWriter.flush(ClickhouseSinkWriter.java:124)
        ... 16 more
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   Spark 3.2
   
   ### Java or Scala Version
   
   java8
   
   ### Screenshots
   
   <img width="1147" alt="image" 
src="https://github.com/apache/seatunnel/assets/34698497/e420c521-277c-4a9f-a6c7-fb9d7be5ad8f";>
   
   
   ### Are you willing to submit PR?
   
   - [ ] 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