aliyun / aliyun-maxcompute-data-collectors

Apache License 2.0
121 stars 63 forks source link

在kettle上创建mysql到odps的转换,当odps表有partition时,会抛出异常 #7

Open turalyang opened 7 years ago

turalyang commented 7 years ago

在kettle上创建mysql到odps的转换,当odps表有partition时,会抛出异常 2017/08/02 09:16:15 - test-addition - Dispatching started for transformation [test-addition] 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Drop MaxCompute 目的表分区失败. 错误发生在项目:null 的表:kettle_test 的分区:columnc=1. 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : java.lang.RuntimeException: Drop MaxCompute 目的表分区失败. 错误发生在项目:null 的表:kettle_test 的分区:columnc=1. 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.OdpsUtil.dropPart(OdpsUtil.java:120) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.OdpsUtil.truncatePartition(OdpsUtil.java:103) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.OdpsUtil.dealTruncate(OdpsUtil.java:48) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.pentaho.di.trans.steps.odpsoutput.OdpsOutput.init(OdpsOutput.java:223) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:69) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at java.lang.Thread.run(Thread.java:745) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - Caused by: com.aliyun.odps.NoSuchObjectException: ODPS-0130161:Parse exception - line 1:12 mismatched input 'null' expecting Identifier near 'TABLE' in table name 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.rest.RestClient.handleErrorResponse(RestClient.java:369) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.rest.RestClient.request(RestClient.java:301) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.rest.RestClient.request(RestClient.java:251) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.rest.RestClient.stringRequest(RestClient.java:227) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.Instances.create(Instances.java:337) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.Instances.create(Instances.java:272) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.Instances.create(Instances.java:222) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.Instances.create(Instances.java:117) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.Table.runSQL(Table.java:1082) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.Table.deletePartition(Table.java:920) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - at com.aliyun.odps.OdpsUtil.dropPart(OdpsUtil.java:118) 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - ... 5 more 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - Caused by: com.aliyun.odps.rest.RestException: RequestId=598127E06B60FA292B0DA7AC,Code=NoSuchObject,Message=ODPS-0130161:Parse exception - line 1:12 mismatched input 'null' expecting Identifier near 'TABLE' in table name 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - ... 16 more 2017/08/02 09:16:16 - Aliyun MaxCompute Output.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Error initializing step [Aliyun MaxCompute Output] 2017/08/02 09:16:16 - test-addition - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Step [Aliyun MaxCompute Output.0] failed to initialize! 2017/08/02 09:16:16 - input.0 - Finished reading query, closing connection. Unable to prepare and initialize this transformation 异常中显示通过Partition获取到的project name为null,而在配置中已经配置过了。 如果自己按照源码中逻辑自己手动写代码创建odps对象获取Table的时候获取Partition和修改都是没问题的,不知道为什么打包成插件通过kettle调用就有问题。

oyz commented 7 years ago

这个问题我会尝试复现看看, 在分区不存在的情况,是正常的吗?