How can I add a maven dependency for dremio jdbc client?

I am new to dremio ,Can anyone please help me how to add a dependency for dremio jdbc driver in maven project?

Did you get the answer? I also want to know.

You can add the following to your maven project:

<project>
  [...]
  <repositories>
    <repository>
      <id>dremio-free</id>
      <url>https://maven.dremio.com/free/</url>
    </repository>
   </repositories>

  <dependencies>
    <dependency>
      <groupId>com.dremio.distribution</groupId>
      <artifactId>dremio-jdbc-driver</artifactId>
      <version>${dremio.version}</version>
    </dependency>
  </dependencies>
</project>

Thank You so much, I am not getting the information about the version anywhere. What would be the version.

Same versions as used for the download: https://download.dremio.com/jdbc-driver/

Hello team, we are getting issue https://github.com/netty/netty/issues/8537, while scanning for the latest jar. Could you please let us know the version which does not have vulnerability issues?

could anyone please let us know the exact version without issues

1 Like

Hello team, we are getting issue https://github.com/netty/netty/issues/8537 , while scanning for the latest jar. Could you please let us know the version which does not have vulnerability issues?

Please open new topics for new questions.

As for your question, the link you provided is an open bug for Netty 5 (which hasn’t been released yet). As of now, dremio uses Netty 4.1.

Maybe are you referring to this issue: https://github.com/netty/netty/issues/9930? This is not a netty bug but a configuration issue on the client, but Dremio itself is not affected as its code already enable hostname verification: https://github.com/dremio/dremio-oss/blob/master/services/base-rpc/src/main/java/com/dremio/exec/rpc/ssl/SSLEngineFactoryImpl.java#L173

I 've a gradle project and i 'm trying to download the driver with the following configuration:
compile(“com.dremio.client:dremio-client-jdbc:4.2.1-202004111451200819-0c3ecaea”)

The issue is i have this error:
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ‘:compile’.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.apache.arrow:arrow-vector:1.0.0-20200327115344-e8784bde9c-dremio.
Required by:
project : > com.dremio.client:dremio-client-jdbc:4.2.1-202004111451200819-0c3ecaea > com.dremio:dremio-common:4.2.1-202004111451200819-0c3ecaea
project : > com.dremio.client:dremio-client-jdbc:4.2.1-202004111451200819-0c3ecaea > com.dremio.client:dremio-client-base:4.2.1-202004111451200819-0c3ecaea
project : > com.dremio.client:dremio-client-jdbc:4.2.1-202004111451200819-0c3ecaea > com.dremio.client:dremio-client-base:4.2.1-202004111451200819-0c3ecaea > com.dremio.sabot:dremio-sabot-vector-tools:4.2.1-202004111451200819-0c3ecaea
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.apache.arrow:arrow-vector:1.0.0-20200327115344-e8784bde9c-dremio.
Caused by: org.gradle.api.resources.ResourceException: Could not get resource ‘https://companyregistry/repository/maven-snapshots/org/apache/arrow/arrow-vector/1.0.0-20200327115344-e8784bde9c-dremio/arrow-vector-1.0.0-20200327115344-e8784bde9c-dremio.pom’.

I’ve already added https://maven.dremio.com/free/ as maven repository

Any sugestion?

Use com.dremio.distribution:dremio-jdbc-driver:4.2.1-202004111451200819-0c3ecaea instead, which is the real JDBC driver artifact.

Using the above dependency gives
Could not resolve com.dremio.distribution:dremio-jdbc-driver:14.0.0-202103011714040666-9a0c2e10.

Also using: compile com.dremio.client:dremio-client-jdbc:+ gives Could not resolve com.dremio.client:dremio-client-jdbc:+

How can i use the dremio JDBC driver with gradle ?

Some further info for this that might prevent someone else from cloning the whole dremio-oss github repo to try to build dremio-jdbc-driver themselves. You don’t need to do that… Instead:

  1. Check the available releases here: https://docs.dremio.com/release-notes/
  2. Find the corresponding version here: https://download.dremio.com/jdbc-driver/
  3. Use that version in pom.xml, e.g.:
<dependency>
    <groupId>com.dremio.distribution</groupId>
    <artifactId>dremio-jdbc-driver</artifactId>
    <version>15.5.0-202105040508160960-dddd4dca</version>
    <scope>runtime</scope>
</dependency>
  1. NOTE: Intermediate, unreleased versions shown on downloads page cannot be used.