本文介绍了Apache Drill 1.2和Oracle JDBC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Apache Drill v1.2和Oracle Database 10g企业版10.2.0.4.0-嵌入式模式下的64位.

Using Apache Drill v1.2 and Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit in embedded mode.

我很好奇,是否有人成功将Apache Drill连接到Oracle DB.我已经使用以下配置(每个文档)更新了drill-override.conf:

I'm curious if anyone has had any success connecting Apache Drill to an Oracle DB. I've updated the drill-override.conf with the following configurations (per documents):

drill.exec: {
  cluster-id: "drillbits1",
  zk.connect: "localhost:2181",
  drill.exec.sys.store.provider.local.path = "/mypath"
}

并将ojdbc6.jar放在\apache-drill-1.2.0\jars\3rdparty中.我可以成功创建存储插件:

and placed the ojdbc6.jar in \apache-drill-1.2.0\jars\3rdparty. I can successfully create the storage plug-in:

{
  "type": "jdbc",
  "driver": "oracle.jdbc.driver.OracleDriver",
  "url": "jdbc:oracle:thin:@<IP>:<PORT>:<SID>",
  "username": "USERNAME",
  "password": "PASSWORD",
  "enabled": true
}

但是当我发出查询时,例如:

but when I issue a query such as:

    select * from <storage_name>.<schema_name>.`dual`;

我收到以下错误:

Query Failed: An Error Occurred
org.apache.drill.common.exceptions.UserRemoteException: VALIDATION ERROR: From line 1, column 15 to line 1, column 20: Table '<storage_name>.<schema_name>.dual' not found [Error Id: 57a4153c-6378-4026-b90c-9bb727e131ae on <computer_name>:<PORT>].

我尝试查询其他模式/表并获得相似的结果.我也尝试连接到Teradata并得到相同的错误.是否有人提出建议/遇到类似问题?

I've tried to query other schema/tables and get a similar result. I've also tried connecting to Teradata and get the same error. Does any one have suggestions/run into similar issues?

推荐答案

它与Drill 1.3(2015年12月23日发布)一起使用

It's working with Drill 1.3 (released on 23-Dec-2015)

插件:名称- oracle

{
  "type": "jdbc",
  "driver": "oracle.jdbc.driver.OracleDriver",
  "url": "jdbc:oracle:thin:user/[email protected]:1521:orcl ",
  "enabled": true
}

查询:

select * from <plugin-name>.<user-name>.<table-name>;

示例:

select * from oracle.USER.SAMPLE;

查看钻头的文档以了解更多详细信息.

Check drill's documentation for more details.

这篇关于Apache Drill 1.2和Oracle JDBC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-08 02:54