How to add third-party JDBC driver?

by Nov 4, 2015

I tried to add a new JDBC driver for Apache Drill following the examples in the docs for the DB2 zOS drivers. I tried both copying the jar into the lib/drivers directory and creating a lib/drill and adding a classpath entry in datastudio.ini. Either way it did not recognize the driver – it wasn’t in the About->JDBC drivers list, nor was it an option when creating a new server instance.

How do you add a new third-party driver?



Niels Gron over 7 years ago
You’ve added the driver correctly. But the driver will not show up in either locations. To use the driver you need to create a “Generic JDBC” connection type. Have you tried the “Generic JDBC” connection type?

Can you tell me what files you included for the Apache Drill driver? We haven’t tested Apache Drill, so just keep in mind that the 3rd party libraries they use might conflict.

Eric Pederson over 7 years ago
Thanks, I will try that.

There is a single jar that includes everything called drill-jdbc-all-1.4-.jar. In there it includes all of the classes, including third parties. They have shaded most things though, so hopefully there are no conflicts. I was thinking that Aqua would create a new classloader for each query window, is that not the case?

Niels Gron over 7 years ago
If you register a Generic-JDBC driver and choose the *.jar files in the registration it will then use a custom classloader to load the jars. In this case, you don’t need to place the *.jar files into the \lib\drivers folder.

Try this and see if you have problems. If you do, let us know the error messages you get.

Eric Pederson over 7 years ago
I added it using Generic JDBC and it worked – thanks!

I did need to switch the JRE to 1.7.