About this task
To use the Drill JDBC driver with SQuirreL, complete the following steps:
Procedure
-
Download the Drill JDBC Driver and then
unzip the file. The Drill JDBC Driver JAR files must exist in a directory on
your machine before you can configure the driver in the SQuirreL client.
-
Define the driver.
-
Open the SQuirreL client.
-
In the SQuirreL toolbar, select Drivers > New Driver. The Add
Driver dialog appears.
-
Enter the following information:
- Name - Name for the Drill JDBC Driver
- Example URL -
jdbc:drill:zk=<zookeeper_quorum>
Example:
jdbc:drill:zk=maprdemo:5181
- Website URL -
jdbc:drill:zk=<zookeeper_quorum>
Example:
jdbc:drill:zk=maprdemo:5181
Example:
jdbc:drill:zk=10.10.100.113:5181,10.10.100.115:5181
-
Select Extra Class Path, and click Add.
-
Navigate to the directory that contains the JDBC JAR files.
-
Select all of the files in the directory, and click
Choose.
-
In the Class Name drop-down field, select
com.mapr.drill.jdbc41.Driver. Type
com.mapr.drill.jdbc41.Driver in the field if the option does
not appear.
-
Click Ok. The SQuirreL client displays a message stating that
the driver registration is successful, and you can see the driver in the
Drivers panel.
-
Create a database alias.
-
Select the Aliases tab.
-
In the SQuirreL toolbar, select Aliases > New Alias. The Add
Alias dialog box appears.
-
Enter the following information and click Ok.
- Alias Name - A unique name for the Drill JDBC Driver
alias
- Driver - Select the Drill JDBC Driver
- URL - Enter the connection URL with the name of the Drill
directory stored in ZooKeeper and the cluster ID.
- User Name - admin
- Password - admin
The Connect to: dialog appears.
-
Click Connect. SQuirreL displays a message stating that the
connection is successful.
-
Click Ok. SQuirrel is connected to Drill through the Drill JDBC
driver. You can run your queries.