gremlin

will Gremlin graph queries always perform operations in it's own address space?

我的未来我决定 提交于 2019-12-12 01:29:42
问题 admittedly, most of my database experience is relational. one of the tenets in that space is to avoid moving data over the network. this manifests by using something like: select * from person order by last_name limit 10 which will presumably order and limit within the database engine vs using something like: select * from person and subsequently ordering and taking the top 10 at the client which could have disastrous effects if there are a million person records. so, with Gremlin (from

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

How can I avoid to many executed gremlinqueries in my C#-Code?

折月煮酒 提交于 2019-12-11 18:33:02
问题 I have this Database: Clients => Incident => File => Filename Clients have an ID Incidents have an ID and a reportedOn property Files have an ID and a fileSize, mimeType, malware property Filenames have an ID Client have a outgoing Edge to Incidents (reported), incident have a outgoing Edge to file (containsFile), file have a outgoing Edge to filename (hasName). Here is some sample DATA: g.addV('client').property('id','1').as('1'). addV('incident').property('id','11').property('reportedON',

Gremlin query is returning no results when part of the query returns nothing

佐手、 提交于 2019-12-11 17:57:17
问题 I have a gremlin query which finds the vertices I want to archive but it is returning an empty array. My graph is laid out in a way where a vertex can have multiple parents and children. When a vertex is archived then it needs to archive all of it's affected descendants that would be 'orphaned' by this process. If any of the descendants have a path back to a central vertex then it shouldn't archive it because it won't be 'orphaned' g.V(itemId) // Find the item to delete. .union( // Start a

Gremlin - adding new vertex if it exceeds the limit

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 17:45:45
问题 Sample data: I have two vertices by names User , Points First adding data for vertex User g.addV('User').property('id',1). addV('User').property('id',2). addV('User').property('id',3).iterate() Now adding Points vertices and connecting addingPoints Edge from User to Points g.V().hasLabel('User').has('id',1).as('curUser1'). V().hasLabel('User').has('id',2).as('curUser2'). V().hasLabel('User').has('id',3).as('curUser3'). addV('Points').property('totalPoints',0).property('userPoints',0).

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],

Constraints for graph models

 ̄綄美尐妖づ 提交于 2019-12-11 17:28:58
问题 I have four possible chains that can be formed with 6 different chain links: G0 -> G1 -> G2 E0 -> E1 -> E2 G0 -> E1 -> G2 E0 -> G1 -> G2 Now I want to express this four chains using a graph model which would look like the following picture: If I use a graph query language to ask eg give me all paths having G0 as first vertex and E2 as last vertex, I would get a path G0 -> E1 -> E2 which is not a valid path or chain out of the four... So my question is is there a possibility to express such

Traverse graph database from random seed nodes

依然范特西╮ 提交于 2019-12-11 16:23:37
问题 I am tasked with writing a query for a front-end application that visualizes a Neptune Graph database. Let us say that the first vertex are items while the second vertex user. A user can create an item. There are item to item relationships to show items derived from another item like in the case of media clips cut out of an original media clip. The first set of items created should be created in a vertex such as a SERVER which they are grouped by in the UI. The following is the requirement:

How to delete the unmodifiable vertex which has no edges in gremlin?

时光怂恿深爱的人放手 提交于 2019-12-11 14:46:52
问题 Unfortunately, I have three provides in my application. when I used two different providers which are having same email then there is another vertex got created with new id in the graph. Providers issue got solved.But, now I want to delete that newly created vertex. I have tried g.V('Persona').has('personaId','personaId').drop() But it is saying that, Cannot modify unmodifiable vertex: v[73732348] 回答1: My answer might not quite solve your problem, but I will just point out that the error you

Fetching all the paths between two nodes using gremlin in java

↘锁芯ラ 提交于 2019-12-11 13:17:48
问题 Hi I am kinda new to gremlin and trying to achieve some solve by finding all the paths between two nodes. In simple query on gremlin console I was able to do that using this query : (Name of the first Node).loop(1){it.loops<100}{true}.has('name', (Name of the second node)).path{it.name} But while I was trying to fetch that from java methods I am into sea of problems, like: -- no clue on where to put the query exactly ? -- what data structure will be right to receive the array of rows. -- how