Sdreamery opened a new issue, #9248:
URL: https://github.com/apache/seatunnel/issues/9248

   ### 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
   
   When the Source end is Oracle or HANA, the Sink end writes an empty string 
to StarRocks and uses Console to output data normally. Unless the fields are 
first converted to uppercase letters before field mapping, for example, in 
configuring starrocks.comonfig, write: columns = 
"COLUMN1,COLUMN2,COLUMN3,column1=COLUMN1,column2=COLUMN2,column3=COLUMN3", But 
the official document did not provide a corresponding solution for this.
   
   ### SeaTunnel Version
   
   2.3.10、2.3.9 
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 3
     job.mode = "BATCH"
     checkpoint.interval = 5000
   }
   
   source {
     Jdbc {
       url = "jdbc:oracle:thin:@10.0.1.123:1521:LMIS"
       driver = "oracle.jdbc.OracleDriver"
       connection_check_timeout_sec = 100
       user = "test"
       password = "test"
       query = """
         select
           c.em_code,
           h.businessbill_no,
           g.goods_no,
           g.goods_name,
           l.goods_lotno,
           l.supplier_lot,
           c.operator,
           CAST(c.oper_time as TIMESTAMP) as oper_time
         from rec_em_code c, bill_outstorehouse_hdr h, fd_lotno l, fd_goods g
         where c.bill_hdr_id = h.bill_hdr_id
         and c.goods_id = g.goods_id
         and c.lotno_id = l.lotno_id
         and h.stock_address = 'CP03'
         and c.oper_time >= TRUNC(CURRENT_DATE)
       """
     }
   }
   
   sink {
     StarRocks {
       nodeUrls = ["10.0.1.224:8030","10.0.1.225:8030","10.0.1.226:8030"]
       base-url = "jdbc:mysql://10.0.1.225:9030"
       username = root
       password = "test"
       database = "lr_ods"
       table = "test01"
       batch_max_rows = 100000
       batch_max_bytes = 52428800
       batch_interval_ms = 2000
       starrocks.config = {
         format = "JSON"
         strip_outer_array = true  
       }
     }
   }
   ```
   
   ### Running Command
   
   ```shell
   $SEATUNNEL_HOME/bin/seatunnel.sh --config 
$SEATUNNEL_HOME/job/test02_batch.config -n test02_batch
   ```
   
   ### Error Exception
   
   ```log
   If the primary key is set on the sink side table, an error will be reported: 
Error: NULL value in non-nullable column 'column1'. If no primary key is set, 
all tables on the Sink end will be empty strings after writing.
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### 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