Hi George

I will suggest you to put the drill-jdbc jar into your class path and use 
java-jdbc connectivity to open a connection,execute a query and get the 
results. 

Class.forName("org.apache.drill.jdbc.Driver”) // load the jdbc driver
Connection connection = 
DriverManager.getConnection(“"jdbc:drill:zk=x.x.x.:5181,x.x.x.x:5181,x.x.x.x:5181/drill/cluster-id;schema=dfs"”);
 // get the connection from driver manager
statement = connection.createStatement(); // create statement
resultSet = statement.executeQuery(query);

get ResultSetMetaData from ResultSet to know the return columns from the cursor 
and appropriately get the values using the ResultSet.

Rajkumar Singh
MapR Technologies


> On May 24, 2015, at 8:33 PM, George Lu <[email protected]> wrote:
> 
> Hi all,
> 
> In addition to Drill Restful API, can I use jars/drill-jdbc-<version>.jar
> in JAVA client to query? I don't find any documentation of which class I
> can use. If possible, can someone show me?
> 
> Thanks!
> 
> Regards,
> George Lu

Reply via email to