Search code examples
gremlinjanusgraphgremlin-server

Load data into Janusgraph


I've built a java class to load data from csv to janusgraph.

Is there a way to load my java class from the gremlin console similar to the invocation of Example in JanusGraph doc(GraphOfGodsFactory).

Should I build the source project along with my java class? I believe there should be some better way for this


Solution

  • If you have a Java class, you just need to build it to a jar and add it to the Gremlin Console classpath. Simply copy it into the GREMLIN_CONSOLE_HOME/lib directory and then issue a command like:

    gremlin> import com.my.company.MyClass
    

    Once you do that MyClass will be available for usage as GraphOfTheGodsFactory is.