tinkerpop3

Tinkerpop 3.1 on OrientDB?

こ雲淡風輕ζ 提交于 2019-12-11 23:27:51
问题 is there any way to run Tinkerpop Gremlin 3.1 traversals in OrientDB? I've noticed that currently the DBMS supports the previous version (2.x) of the Tinkerpop traversal language which, for example, only allows to directly filter edges by label, but not vertices :( . I was quite satisfied with gremlin-scala and orientDB-gremlin but I found that not all my queries where efficiently executed (some indexes were ignored). Is there any other way? Thanks in advance :) 回答1: Orientdb-gremlin is

Converting long value(epoch) to Date format using gremlin query

半城伤御伤魂 提交于 2019-12-11 17:43:35
问题 I have vertex created date in long format (epoch). I want to convert the long value into particular date format (YYYY-MM or YYYY-MM-DD) using gremlin query. .map or .transform is not working. Can someone please help. 回答1: The Gremlin language doesn't have built in features to convert dates. You would have to use a lambda if you want to do it within Gremlin - for Groovy it would look like: gremlin> g = TinkerGraph.open().traversal() ==>graphtraversalsource[tinkergraph[vertices:0 edges:0],

Using SparkGraphComputer to traverse a titan cluster throws an error

六眼飞鱼酱① 提交于 2019-12-11 14:28:16
问题 I have a cluster set up with tinkerpop-3.1.1, titan-1.1.0-SNAPSHOT, spark-1.5.2 and hadoop-2.7.1 and run this script to reproduce an error: graph = GraphFactory.open("hadoop-gryo.properties") graph.traversal().V().count() graph.traversal(computer(SparkGraphComputer)).V().next() graph = GraphFactory.open("titan-cassandra-test-spark.properties") graph.traversal().V().count() graph.traversal(computer(SparkGraphComputer)).V().next() The last call produces this error: You must set the initial

Unable to install gremlin-neo4j through gremlin shell

血红的双手。 提交于 2019-12-11 12:28:19
问题 So, I'm going through the tutorial on getting started with the TinkerPop 3.0 stuff. I've gotten the basic API working with the TinkerGraph stuff, and I'm moving on to try and interface with my local Neo4j instance (Community 2.2.2). I'm working through the tutorial here: http://tinkerpop.incubator.apache.org/docs/3.0.0.M9-incubating/ but, the neo4j-gremlin plugin does not appear to exist as documented. Neither the gradle line: compile group : 'org.apache.tinkerpop', name: 'neo4j-gremlin',

Group Parent Vertex and Children through Edges into master/sub json array

对着背影说爱祢 提交于 2019-12-11 09:22:25
问题 First of i am using azure cosmos db. A person works_for multiple Offices. Each Office can be IsMaster or not. If it is a IsMaster it can have master_of edge to another Office. Each works_for edge has AccessLevel property for a person. Logic: Given a Person name, get all Offices that person works_for that are IsMaster = 'true'. Then return all IsMaster with AccessLevel taken from works_for and corresponding SubOffices that each IsMaster has through master_of edge and corresponding AccessLevel

TinkerPop: Gremlin revisiting visited edges

我的梦境 提交于 2019-12-11 08:46:06
问题 Sample Data: Query to create sample data g.addV("Test1").property("title", "A") g.addV("Test2").property("title", "B") g.addV("Test3").property("title", "C") g.addV("Test4").property("title", "D") g.V().has("Test1", "title", "A").addE("rel").to(g.V().has("Test2", "title", "B")) g.V().has("Test2", "title", "B").addE("rel").to(g.V().has("Test3", "title", "C")) g.V().has("Test3", "title", "C").addE("rel").to(g.V().has("Test4", "title", "D")) Query : Find how A is connected to A Expected answer:

How to add multiple edges in a single gremlin query?

流过昼夜 提交于 2019-12-11 06:37:01
问题 My scenario is to add multiple edges between vertices in a single query: Assume the nodes below: These are the labels and ids I have Users : 4100 Songs : 4200 4355 4676 I have to establish edges between these vertices 4100 --> 4200, 4100 --> 4355, 4100 --> 4676. We can do it normally by creating single edge between node.it is not a efficient method if we want to create edge between more than 50 vertices at a time. I am using Tinkerpop 3.0.1 . 回答1: If you have the vertex ids, it is very

Printing/Fetching Vertex values from a path

浪子不回头ぞ 提交于 2019-12-11 06:06:00
问题 Just getting started with gremlin. Printing out all the Vertex values worked out fine gremlin> g.V().values() ==>testing 2 ==>Cash Processing ==>Sales ==>Marketing ==>Accounting I was able to find all the directly connected path between my Vertices. gremlin> g.V().hasLabel('Process') .repeat(both().simplePath()) .until(hasLabel('Process')) .dedup().path() ==>[v[25],v[28]] ==>[v[25],v[26]] ==>[v[26],v[27]] ==>[v[26],v[25]] Now am trying to print out the values in the path like ['Sales',

AWS Lambda + Tinkerpop/Gremlin + TitanDB on EC2 + AWS DynamoDB in cloud

≯℡__Kan透↙ 提交于 2019-12-11 04:45:34
问题 I am trying to execute following flow: user hits AWS Gateway (REST), it triggers AWS Lambda, that uses Tinkerpop/Gremlin connects to TitanDB on EC2, that uses AWS DynamoDB in cloud (not on EC2) as backend. Right now I have managed to crete fully working TitanDB instance on EC2, that stores data in DynamoDB in cloud. I am also able to connect from AWS Lambda to EC2 through Tinkerpop/Gremlin BUT only this way: Cluster.build() .addContactPoint("10.x.x.x") // ip of EC2 .create() .connect()

Get edge properties as well as source and target vertex ID in Gremlin query language

*爱你&永不变心* 提交于 2019-12-11 02:49:29
问题 I am trying to retrieve the edge properties as values as well as the target and source node IDs. My current database looks like that: Edge: _id _label _outV _inV name ID 0 edge 0 1 E 0 Nodes: _id _label _name ID 0 node A 0 1 node B 1 I have tried this query: >g.V().as('a').outE('edge').as('b').inV().values('ID').as('to'). select('b').valueMap().as('edge'). select('a').values('ID').as('from'). select('to','edge','from') ==>[to:0,edge:[ID:0,name:E],from:1] What I am trying to get is [to:0,ID:0