如何加速从oracle数据库到pentaho数据集成的数据获取?

时间:2017-04-18 12:48:53

标签: oracle12c pentaho-data-integration

我正在使用pentaho数据集成5.4.1.130和Oracle 12c。我已经使用ojdbc7.jar成功连接了oracle数据库(使用jre 1.7.0.51 for pentaho)。但是当我尝试在转换中从oracle数据库预览表时,我收到以下错误。

先谢谢。

这是日志:

2017/04/18 17:15:49 - Version checker - OK
2017/04/18 18:16:53 - /Transformation 1 - Dispatching started for transformation [/Transformation 1]
2017/04/18 18:16:56 - Table input.0 - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) : Unexpected error
2017/04/18 18:16:56 - Table input.0 - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2017/04/18 18:16:56 - Table input.0 - An error occurred executing SQL: 
2017/04/18 18:16:56 - Table input.0 - select * from "APPS"."PO_VENDORS";
2017/04/18 18:16:56 - Table input.0 - ORA-00933: SQL command not properly ended

2017/04/18 18:16:56 - Table input.0 - 
2017/04/18 18:16:56 - Table input.0 -   at org.pentaho.di.core.database.Database.openQuery(Database.java:1722)
2017/04/18 18:16:56 - Table input.0 -   at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:224)
2017/04/18 18:16:56 - Table input.0 -   at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:138)
2017/04/18 18:16:56 - Table input.0 -   at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2017/04/18 18:16:56 - Table input.0 -   at java.lang.Thread.run(Unknown Source)
2017/04/18 18:16:56 - Table input.0 - Caused by: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:45)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:766)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:897)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1034)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1244)
2017/04/18 18:16:56 - Table input.0 -   at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:420)
2017/04/18 18:16:56 - Table input.0 -   at org.pentaho.di.core.database.Database.openQuery(Database.java:1711)
2017/04/18 18:16:56 - Table input.0 -   ... 4 more
2017/04/18 18:16:56 - Table input.0 - Finished reading query, closing connection.
2017/04/18 18:16:56 - Table input.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)
2017/04/18 18:16:56 - /Transformation 1 - Transformation detected one or more steps with errors.
2017/04/18 18:16:56 - /Transformation 1 - Transformation is killing the other steps!

1 个答案:

答案 0 :(得分:0)

正确检查日志。您的SQL语法中存在错误。不要使用双引号。如果必须使用它们,请确保正确使用外壳。

在Oracle中的标识符周围加上双引号会导致Oracle将标识符视为区分大小写,而不是使用大小写不敏感的默认值。如果在名称周围创建一个带双引号的表(或列),则必须始终使用双引号引用标识符并正确指定大小写(除了所有大写标识符,其中双引号无意义) )。