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

   ### 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
   
   Using Oracle JDBC source + Doris sink to synchronize data, the Oracle data 
type is DATE with DATA_LENGTH = 7, storing values in the format yyyy-MM-dd 
HH:mm:ss. When creating the table in Doris, the corresponding field is defined 
as DATETIME. However, after importing the data into Doris, it was found that 
the field loses its precision.
   
   ### SeaTunnel Version
   
   apache-seatunnel-2.3.2
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
     job.mode = "BATCH"
     spark.app.name = "seatunnel-jdbc-to-doris-demo"
     spark.yarn.queue = "default"
     spark.executor.instances = 10
     spark.executor.cores = 1
     spark.driver.memory = "4g"
     spark.executor.memory = "4g"
     spark.hadoop.hive.exec.dynamic.partition = "true"
     spark.hadoop.hive.exec.dynamic.partition.mode = "nonstrict"
     spark.sql.sources.partitionOverwriteMode = "dynamic"
     spark.executor.extraJavaOptions = "-Dfile.encoding=UTF-8"
     spark.driver.extraJavaOptions = "-Dfile.encoding=UTF-8"
     spark.port.maxRetries=300
   
   }
   source{
        Jdbc {
                url = "jdbc:oracle:thin:@localhost:1521:ERPPRD"
                driver = "oracle.jdbc.driver.OracleDriver"
                connection_check_timeout_sec = 100
                user = "user"
                password = "xxxxx"
                query = "SELECT * FROM apps.xxxx dist WHERE 
dist.accounting_date >= to_date(substr('2025-01-01 00:00:00', 1, 10), 
'yyyy-mm-dd') AND dist.accounting_date <= to_date(substr('2025-01-02 23:59:59', 
1, 10), 'yyyy-mm-dd')"
                result_table_name = "source_table"
                parallelism = 1
        }
   }
   
   sink {
        Doris {
                source_table_name = "source_table"
                fenodes = "localhost:8030"
                username = xx
                password = "xxx"
                table.identifier = "stg.jdbc_to_doris_demo_03"
                sink.enable-2pc = "true"
                sink.label-prefix = "jdbc_to_doris_demo_03"
                doris.config = {
                        format="csv"
                        column_separator = ","
                }
        }
   }
   ```
   
   ### Running Command
   
   ```shell
   
/usr/local/apache-seatunnel-2.3.2/bin/start-seatunnel-spark-3-connector-v2.sh 
--master yarn --deploy-mode client --config 
/app/data/seatunnel/jdbc_to_doris.conf
   ```
   
   ### Error Exception
   
   ```log
   Using Oracle JDBC source + Doris sink to synchronize data, the Oracle data 
type is DATE with DATA_LENGTH = 7, storing values in the format yyyy-MM-dd 
HH:mm:ss. When creating the table in Doris, the corresponding field is defined 
as DATETIME. However, after importing the data into Doris, it was found that 
the field loses its precision.
   ```
   
   ### Zeta or Flink or Spark Version
   
   spark 3.2
   
   ### Java or Scala Version
   
   jdk 1.8
   
   ### Screenshots
   
   
![Image](https://github.com/user-attachments/assets/aebbc0fe-0b5c-43ac-b720-4127b6ffa893)
   
   ### 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