This is a sample code snippet to connect to drill using Drill-Jdbc-all Driver.

Class.forName("org.apache.drill.jdbc.Driver");
Connection connection 
=DriverManager.getConnection("jdbc:drill:zk=node3.mynode.com:5181/drill/my_cluster_com-drillbits");
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery("SELECT * from cp.`employee`");
while(rs.next()){
System.out.println(rs.getString(1));
}


Rajkumar Singh
MapR Technologies


> On Sep 3, 2015, at 12:50 PM, Sudip Mukherjee <[email protected]> wrote:
> 
> Hi Devs,
> 
> Is there way to connect a drillbit using the jdbc driver. Could you please 
> point me to an example if there is one?
> 
> Thanks,
> Sudip
> 
> 
> 
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material for the
> sole use of the intended recipient. Any unauthorized review, use or 
> distribution
> by others is strictly prohibited. If you have received the message by mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************

Reply via email to