Using the Drill JDBC Driver with SQuirreL

You can use the Drill JDBC driver with SQuirreL to connect to Drill and query data sources configured in Drill. To use the Drill JDBC Driver with SQuirreL, verify that your system meets the prerequisites and then download and configure the driver.

When you configure the driver, you define the driver and create an alias. The alias is a specific instance of the driver configuration. SQuirreL uses the driver definition and alias to connect to Drill so you can access data sources that you have registered with Drill. When you create the alias, you provide a connection URL that includes the name of the Drill directory stored in ZooKeeper and the cluster ID. The URL has the following format:

jdbc:drill:zk=<zookeeper_quorum>/<drill_directory_in_zookeeper>/<cluster_ID>

The following examples show URLs for Drill installed on a single node:

jdbc:drill:zk=10.10.100.56:5181/drill/demo_mapr_com-drillbits
jdbc:drill:zk=10.10.100.24:2181/drill/drillbits1

The following example shows a URL for Drill installed in distributed mode with a connection to a ZooKeeper quorum:

jdbc:drill:zk=10.10.100.30:5181,10.10.100.31:5181,10.10.100.32:5181/drill/drillbits1
Note:
  • The ZooKeeper port is 2181. In a MapR cluster, the ZooKeeper port is 5181.
  • The Drill directory stored in ZooKeeper is /drill.
  • The Drill default cluster ID is drillbits1. To determine the cluster ID, check the following file:
    <drill-installation>/conf/drill-override.conf
    For example:
    ... drill.exec: { cluster-id: "docs41cluster-drillbits", zk.connect: "centos23.lab:5181,centos28.lab:5181,centos29.lab:5181" } ...