2

I am trying to connect to Tigergraph DB from Spark using IntelliJ IDE. Can anyone help with the jdbc driver (.jar) file? I am looking for "com.tigergraph.jdbc.Driver".

I did find below gitHub repository with all the required .java file. But, I am not sure how to use it inside my spark project. https://github.com/tigergraph/ecosys/tree/master/tools/etl/tg-jdbc-driver

Can anyone help me on this?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
Surya
  • 45
  • 5

2 Answers2

3

It can be done quickly. I hope you are familiar with maven and git.

  1. [[Command prompt]] git clone https://github.com/tigergraph/ecosys.git
  2. Navigate to [[project checkout path]]\ecosys\tools\etl\tg-jdbc-driver
  3. execute mvn clean compile install -Dmaven.test.skip=true

and then, once build is okay you will get the JAR in the folder

enter image description here

enter image description here

You can use this JAR afterwards in your project.

J.P
  • 495
  • 1
  • 6
  • 15
  • by any chance, is it possible for you to share those .jar files? I am completely new to all this. – Surya Jan 05 '21 at 14:40
  • @Surya You can also build JARs using IntelliJ IDEA if you are not familiar with git & Maven (video guide [#1](https://www.youtube.com/watch?v=3Xo6zSBgdgk), [#2](https://www.youtube.com/watch?v=ZlyTn8PZ3Fc)) – Koyasha Jan 05 '21 at 15:17
  • Thanks @J.P for uploading the jar files into GitHub. I figured out how to build using Maven. Thanks a lot – Surya Jan 05 '21 at 15:28
2

according to the GitHub documentation of tg-jdbc-driver repository, you need to build the JAR and then you can include this dependency in your pom.xml and start using it's API.

Some helpful resources:

https://medium.com/tigergraph/data-lakes-will-yield-more-business-value-when-combined-with-graph-databases-928181dffe24

https://www.programmersought.com/article/68114478380/

J.P
  • 495
  • 1
  • 6
  • 15