alibaba / DataX

DataX是阿里云DataWorks数据集成的开源版本。
Other
15.76k stars 5.39k forks source link

datax抄写oracle->oracle存在时间精度丢失问题 #1180

Open hbhe0316 opened 2 years ago

hbhe0316 commented 2 years ago

oracle版本为19.11 在做oracle到oracle抄写时候,时间类型为timestamp,例如时间为2021-09-25 10:50:00 123456抄写到目标端oracle变成2021-09-25 10:50:00 123000,丢失后面3位精度。

zhbdesign commented 2 years ago

默认的时间格式为 yyyy-MM-dd HH:mm:ss,尝试配置 dateFormat 为正确的时间格式,再测试看看

zhbdesign commented 2 years ago

默认的时间格式为 yyyy-MM-dd HH:mm:ss,尝试配置 dateFormat 为正确的时间格式,再测试看看

zhbdesign commented 2 years ago

oracle版本为19.11 在做oracle到oracle抄写时候,时间类型为timestamp,例如时间为2021-09-25 10:50:00 123456抄写到目标端oracle变成2021-09-25 10:50:00 123000,丢失后面3位精度。

链接:https://pan.baidu.com/s/1jk5V0kDdIXovLFP09I9j6w 提取码:xjc4,已经修复这个问题,有问题反馈

hbhe0316 commented 2 years ago

嗨,您好: 很长时间没有上个人邮箱了,我已经将datax下载,本周内测试,谢谢阿里团队,第一次使用国内开源软件,太强大了。

在 2021-09-28 15:52:53,"zhb" @.***> 写道:

oracle版本为19.11 在做oracle到oracle抄写时候,时间类型为timestamp,例如时间为2021-09-25 10:50:00 123456抄写到目标端oracle变成2021-09-25 10:50:00 123000,丢失后面3位精度。

链接:https://pan.baidu.com/s/1jk5V0kDdIXovLFP09I9j6w 提取码:xjc4,已经修复这个问题,有问题反馈

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

hbhe0316 commented 2 years ago

嗨: 今天我将datax下载完成,测试了,问题还在,不知道是不是我测试的方式有问题。请问咱们datax是否有群可以和您讨论? 阿里钉钉号18500122162,微信也是。

我测试的方式详见博客: https://www.cndba.cn/hbhe0316/article/22826

感谢您百忙之中处理我的问题,谢谢。

在 2021-09-28 15:52:53,"zhb" @.***> 写道:

oracle版本为19.11 在做oracle到oracle抄写时候,时间类型为timestamp,例如时间为2021-09-25 10:50:00 123456抄写到目标端oracle变成2021-09-25 10:50:00 123000,丢失后面3位精度。

链接:https://pan.baidu.com/s/1jk5V0kDdIXovLFP09I9j6w 提取码:xjc4,已经修复这个问题,有问题反馈

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

hbhe0316 commented 2 years ago

嗨: 上一封邮件使用了之前的datax版本,测试的过程是如上一封邮件,给您带来一定的困扰,很抱歉。

我使用了您给我的datax2021-09-28.tar.gz版本抛错了,oracle版本为19.13版本,我也将Oracle的ojdbc8.jar包放到了/datax/plugin/reader/oraclereader/libs/下 我注意到新版的datax已经开始自带ojdbc8-19.7.0.0.jar了。

@. libs]# cd /datax/plugin/reader/oraclereader/libs/ @. libs]# ll total 20776 -rw-r--r-- 1 root root 518641 Dec 14 22:51 commons-collections-3.0.jar -rw-r--r-- 1 root root 207774 Dec 14 22:51 commons-dbcp2-2.8.0.jar -rw-r--r-- 1 root root 327135 Dec 14 22:51 commons-io-2.11.0.jar -rw-r--r-- 1 root root 587402 Dec 14 22:51 commons-lang3-3.12.0.jar -rw-r--r-- 1 root root 61829 Dec 14 22:51 commons-logging-1.2.jar -rw-r--r-- 1 root root 1599627 Dec 14 22:51 commons-math3-3.1.1.jar -rw-r--r-- 1 root root 133109 Dec 14 22:51 commons-pool2-2.8.1.jar -rw-r--r-- 1 root root 101860 Dec 14 22:51 datax-common-0.0.1-SNAPSHOT.jar -rw-r--r-- 1 root root 3632248 Dec 14 22:51 druid-1.2.6.jar -rw-r--r-- 1 root root 661717 Dec 14 22:51 fastjson-1.2.78.jar -rw-r--r-- 1 root root 934783 Dec 14 22:51 guava-r05.jar -rw-r--r-- 1 root root 45024 Dec 14 22:51 hamcrest-core-1.3.jar -rw-r--r-- 1 root root 292027 Dec 14 22:51 logback-classic-1.2.6.jar -rw-r--r-- 1 root root 472431 Dec 14 22:51 logback-core-1.2.6.jar -rw-r--r-- 1 root root 2714189 Dec 14 22:51 ojdbc6-11.2.0.3.jar -rw-r--r-- 1 root root 4398602 Dec 14 22:51 ojdbc8-19.7.0.0.jar -rw-r--r-- 1 root root 4411483 Dec 14 22:51 ojdbc8.jar -rw-r--r-- 1 root root 97143 Dec 14 22:51 plugin-rdbms-util-0.0.1-SNAPSHOT.jar -rw-r--r-- 1 root root 41513 Dec 14 22:51 slf4j-api-1.7.32.jar

@.*** /]# python /datax/bin/datax.py /datax/job/oracletooracle.json

DataX (DATAX-OPENSOURCE-3.0), From Alibaba ! Copyright (C) 2010-2017, Alibaba Group. All Rights Reserved.

2021-12-14 22:52:18.826 [main] INFO VMInfo - VMInfo# operatingSystem class => sun.management.OperatingSystemImpl 2021-12-14 22:52:18.834 [main] INFO Engine - the machine info =>

    osInfo: Oracle Corporation 1.8 25.262-b10
    jvmInfo:        Linux amd64 3.10.0-1160.el7.x86_64
    cpu num:        10

    totalPhysicalMemory:    -0.00G
    freePhysicalMemory:     -0.00G
    maxFileDescriptorCount: -1
    currentOpenFileDescriptorCount: -1

    GC Names        [PS MarkSweep, PS Scavenge]

    MEMORY_NAME                    | allocation_size                | init_size                      
    PS Eden Space                  | 256.00MB                       | 256.00MB                       
    Code Cache                     | 240.00MB                       | 2.44MB                         
    Compressed Class Space         | 1,024.00MB                     | 0.00MB                         
    PS Survivor Space              | 42.50MB                        | 42.50MB                        
    PS Old Gen                     | 683.00MB                       | 683.00MB                       
    Metaspace                      | -0.00MB                        | 0.00MB                         

2021-12-14 22:52:18.852 [main] INFO Engine - { "content":[ { "reader":{ "parameter":{ "password":"**", "column":[ "" ], "connection":[ { "querySql":[ "select from sys.t2 where 1=1" ], "jdbcUrl":[ @.*:1521:orcl" ] } ], "splitPk":"", "username":"system" }, "name":"oraclereader" }, "writer":{ "parameter":{ "password":"****", "column":[ "*" ], "connection":[ { "jdbcUrl":"jdbc:oracle:thin:@//192.168.56.188:1521/orcl", "table":[ "sys.t2" ] } ], "username":"system", "preSql":[] }, "name":"oraclewriter" } } ], "setting":{ "errorLimit":{ "record":0, "percentage":0.02 }, "speed":{ "byte":-1, "record":-1, "channel":5, "batchSize":2048 } } }

2021-12-14 22:52:18.873 [main] WARN Engine - prioriy set to 0, because NumberFormatException, the value is: null 2021-12-14 22:52:18.875 [main] INFO PerfTrace - PerfTrace traceId=job_-1, isEnable=false, priority=0 2021-12-14 22:52:18.875 [main] INFO JobContainer - DataX jobContainer starts job. 2021-12-14 22:52:18.877 [main] INFO JobContainer - Set jobId = 0 2021-12-14 22:52:18.906 [job-0] ERROR JobContainer - Exception when job run com.alibaba.datax.common.exception.DataXException: Code:[Framework-02], Description:[DataX引擎运行过程出错,具体原因请参看DataX运行结束时的错误诊断信息 .]. - java.lang.ClassNotFoundException: com.alibaba.datax.plugin.reader.oraclereader.OracleReader$Job at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at com.alibaba.datax.core.util.container.LoadUtil.loadPluginClass(LoadUtil.java:173) at com.alibaba.datax.core.util.container.LoadUtil.loadJobPlugin(LoadUtil.java:93) at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:661) at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:303) at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113) at com.alibaba.datax.core.Engine.start(Engine.java:92) at com.alibaba.datax.core.Engine.entry(Engine.java:171) at com.alibaba.datax.core.Engine.main(Engine.java:204)

经DataX智能分析,该任务最可能的错误原因是: com.alibaba.datax.common.exception.DataXException: Code:[Framework-02], Description:[DataX引擎运行过程出错,具体原因请参看DataX运行结束时的错误诊断信息 .]. - java.lang.ClassNotFoundException: com.alibaba.datax.plugin.reader.oraclereader.OracleReader$Job at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at com.alibaba.datax.core.util.container.LoadUtil.loadPluginClass(LoadUtil.java:173) at com.alibaba.datax.core.util.container.LoadUtil.loadJobPlugin(LoadUtil.java:93) at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:661) at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:303) at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113) at com.alibaba.datax.core.Engine.start(Engine.java:92) at com.alibaba.datax.core.Engine.entry(Engine.java:171) at com.alibaba.datax.core.Engine.main(Engine.java:204)

2021-12-14 22:52:18.913 [job-0] ERROR Engine - Code:[Framework-02], Description:[DataX引擎运行过程出错,具体原因请参看DataX运行结束时的错误诊断信息 .]. - java.lang.ClassNotFoundException: com.alibaba.datax.plugin.reader.oraclereader.OracleReader$Job at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at com.alibaba.datax.core.util.container.LoadUtil.loadPluginClass(LoadUtil.java:173) at com.alibaba.datax.core.util.container.LoadUtil.loadJobPlugin(LoadUtil.java:93) at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:661) at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:303) at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113) at com.alibaba.datax.core.Engine.start(Engine.java:92) at com.alibaba.datax.core.Engine.entry(Engine.java:171) at com.alibaba.datax.core.Engine.main(Engine.java:204)

在 2021-09-28 15:52:53,"zhb" @.***> 写道:

oracle版本为19.11 在做oracle到oracle抄写时候,时间类型为timestamp,例如时间为2021-09-25 10:50:00 123456抄写到目标端oracle变成2021-09-25 10:50:00 123000,丢失后面3位精度。

链接:https://pan.baidu.com/s/1jk5V0kDdIXovLFP09I9j6w 提取码:xjc4,已经修复这个问题,有问题反馈

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

fwfjava1 commented 1 year ago

oracle版本为19.11 在做oracle到oracle抄写时候,时间类型为timestamp,例如时间为2021-09-25 10:50:00 123456抄写到目标端oracle变成2021-09-25 10:50:00 123000,丢失后面3位精度。

链接:https://pan.baidu.com/s/1jk5V0kDdIXovLFP09I9j6w 提取码:xjc4,已经修复这个问题,有问题反馈

您好,请问具体是改的哪些地方解决的。

fwfjava1 commented 1 year ago

我下载您这个包后,是解决了oracle->oralce的问题;现在想了解下具体的解决方法;我的现在用的oracle->人大金仓也有这个问题。想问下怎么解决的

fwfjava1 commented 1 year ago

自己改了代码,已解决

我下载您这个包后,是解决了oracle->oralce的问题;现在想了解下具体的解决方法;我的现在用的oracle->人大金仓也有这个问题。想问下怎么解决的

jyf1997 commented 1 year ago

我也遇到了这样的问题,请问是修改了哪块的代码?我这边是达梦数据库 @zhbdesign

jyf1997 commented 1 year ago

您知道改哪块的代码吗? @fwfjava1

hbhe0316 commented 1 year ago
我遇到相同的问题,后来的版本也测了也没更新。 何海波

@. | ---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2023年06月08日 14:56 | | 收件人 | alibaba/DataX @.> | | 抄送人 | hbhe0316 @.>, Author @.***> | | 主题 | Re: [alibaba/DataX] datax抄写oracle->oracle存在时间精度丢失问题 (#1180) |

您知道改哪块的代码吗? @fwfjava1

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jyf1997 commented 1 year ago

已解决