Amazon Redshift JDBC Driver 1.2.1 Release Notes. Known Issues. The following are known issues that you may encounter due to limitations in the data.
I've downloaded the RedshiftJDBC41-1.1.17.1007.jar to use the com.amazon.redshift.jdbc41.Driver
for some Redshift POC work that I'm doing, and have been adding it manually to my classpath.
I'd like to now incorporate it into our build, but I can't seem to find an example of a dependency name for it to put in my build.gradle
file or find it in a Maven repo. Any tips? (Note, I'm looking for redshift jdbc only, not the older postgres-redshift driver).
Aws Redshift Jdbc
7 Answers
Redshift JDBC drivers are now available on maven repo. Look at http://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection-with-maven.html
nicolanicolaThe first thing to realize is that amazon documentation tells you to load the v4 version of the driver JAR file. If you downloaded the driver you got a v4X version of the driver so your code should be:
NOT
Note the addition of the version number in the first example!
The driver jar is here:
http://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection.html
Amazon does not publish to Maven (Come on Amazon WTF?) so you have to import the jar you download. The Maven import command (for JDBC) looks like this:
mvn install:install-file -Dfile=./RedshiftJDBC41-1.1.10.1010.jar -DgroupId=com.amazon -DartifactId=redshift.jdbc41 -Dversion=1.1.10.1010 -Dpackaging=jar -DgeneratePom=true
The Maven dependency looks like this (Note that the artificatID and Version should be what you gave it in the mvn command above. If the driver has been updated, then the mvn command and the dependency fields have to change):
David UrryDavid UrrySimple reason why they don't upload to public repo: Licensing.
I wasted many hours because of it. An hour to figure out to find it in maven repo and finding the reason (reading about people comments etc). An hour to upload it to internal repository. Then figuring out how to use it with AWS Lambda.
Amazon doesn't publish RedShift JDBC driver to any public repository, due to some stupid licensing/legal issues. They use LOT of open source projects, but don't contribute anything back to community. Just this redshift driver is an example.
Its a customer centric company, but still there are some legal folks who don't do their work properly. Btw, I'm an ex-employee of amazon.
devsathishAmazon S3
devsathishAmazon does not publish to Maven so you have to import the jar you download.
Gradle
download driver2.create libs folder on the root directory of project
add in the build.gradle
JAVA USAGE EXAMPLE
dnocodednocodeIt seems this artifact is not available in any Maven repo. I was able to find the redshift JDBC driver for version 1.1.2.0002
on this GitHub repo but this is not the version you are looking for.
Your best bet would be to manually add this dependency using:
TunakiTunakiThe easiest way is to add Amazon's Redshift repo to your gradle build file, and then include the dependency like this.
Download Com.amazon.redshift.jdbc4.driver
build.gradle: