3
我不得不使用JanusGraph從Java程序中檢索數據並向其中添加數據。但我不知道如何連接到特定的db.Below圖表是我用來在數據庫中插入數據的代碼,但是當我嘗試從gremlin控制檯中查看數據時,找不到相同的數據。將數據添加到JanusGraph數據庫
JanusGraph graph = JanusGraphFactory.open("conf/janusgraph-cassandra-es.properties");
GraphTraversalSource g = graph.traversal();
graph.addVertex("psid",psid,"firstname",firstname,"last_name",lastname, "locale", locale ,"timezone",timezone, "gender" ,gender,"channel_id",channel_id);
小鬼查詢我在做什麼:
gremlin> JanusGraph graph = JanusGraphFactory.open("conf/janusgraph-cassandra-es.properties");
gremlin> GraphTraversalSource g = graph.traversal();
gremlin> g.V().count()
數查詢給出0作爲輸出和我找不到在數據庫的任何數據。