通过Java的Apache Drill连接 [英] Apache Drill connection through Java
问题描述
或者它与使用JDBC驱动程序运行sql查询等同吗?
您可以使用Drill JDBC驱动程序,这里记录: http://drill.apache.org/docs/using-the-jdbc-driver/
请注意,如果您正在建立你需要在本地安装Drill依赖关系:
mvn install:install-file -Dfile = /opt/apache-drill-1.0.0/jars/drill-java-exec-1.0.0-rebuffed.jar -DgroupId = org.apache.drill.exec -DartifactId = drill-java-exec -Dversion = 1.0.0 -Dpackaging = jar -DgeneratePom = true
mvn install:install-file -Dfile = / opt / apache-drill-1.0.0 / jars / drill-common-1.0.0-rebuffed.jar -DgroupId = org。 apache.drill -DartifactId = drill-common -Dversion = 1.0.0 -Dpackaging = jar -DgeneratePom = true
<这里有一个例子: https://github.com/vicenteg/DrillJDBCExample
Throughout the wiki of apache drill I could only see queries running via sqline client. Is there any programmatical way to run query in Drill other than the REST Api? Any Samples or Pointers?
Or is it as equivalent as using JDBC driver to run sql queries?
You can use the Drill JDBC driver, which is documented here: http://drill.apache.org/docs/using-the-jdbc-driver/
Note that if you're building your Java program with Maven, you'll need to install the Drill dependencies locally:
mvn install:install-file -Dfile=/opt/apache-drill-1.0.0/jars/drill-java-exec-1.0.0-rebuffed.jar -DgroupId=org.apache.drill.exec -DartifactId=drill-java-exec -Dversion=1.0.0 -Dpackaging=jar -DgeneratePom=true
mvn install:install-file -Dfile=/opt/apache-drill-1.0.0/jars/drill-common-1.0.0-rebuffed.jar -DgroupId=org.apache.drill -DartifactId=drill-common -Dversion=1.0.0 -Dpackaging=jar -DgeneratePom=true
And here's an example: https://github.com/vicenteg/DrillJDBCExample
这篇关于通过Java的Apache Drill连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!