drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajkumar Singh <rsi...@maprtech.com>
Subject Re: Apache drill jdbc driver - can i connect to a drillbit?
Date Thu, 03 Sep 2015 07:28:20 GMT
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 <smukherjee@commvault.com> 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."
> **********************************************************************


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message