I'm using arangoDB tinkerpop-provider in JAVA. If I load the collections with arangoimp, it would be a collection in the database without attached to a general graph in arangoDB graph module. So that I could not use a graph name to cite these collections together.
To be more specific, if I use arangoimp, I would do something like this:
arangoimport --file "data.jsonl" --type jsonl --collection users --server.database "myDB"
This command would load the users collection into "myDB". Whereas in graph module under arangosh, I would operate a graph like this:
arangosh> var graph_module = require("@arangodb/general-graph");
arangosh> var graph = graph_module._create("myGraph");
arangosh> graph._addVertexCollection("shop");
Or this to load a existing graph:
arangosh> graph = graph_module._graph("social");Also, in tinkerpop java provider I need to provide a
graph name to indicate a general graph:
ArangoDBConfigurationBuilder builder = new ArangoDBConfigurationBuilder();
builder.graph("modern").arangoUser("username").arangoPassword("password").
withEdgeCollection("e").withVertexCollection("v").configureEdge("e", "v", "v");
Graph graph = GraphFactory.open(builder.build());
So the main gap between use collections and graph module is the
graph name part.
I wonder if there is some way to transfer a set of collections to a graph so that I could operate in graph module or some other ways.
在 2020年1月17日星期五 UTC+8下午6:00:03,Wilfried Gösgens写道: