gremlin

Neo4j - Cypher vs Gremlin query language

情到浓时终转凉″ 提交于 2019-12-18 09:54:36
问题 I'm starting to develop with Neo4j using the REST API. I saw that there are two options for performing complex queries - Cypher (Neo4j's query language) and Gremlin (the general purpose graph query/traversal language). Here's what I want to know - is there any query or operation that can be done by using Gremlin and can't be done with Cypher? or vice versa? Cypher seems much more clear to me than Gremlin, and in general it seems that the guys in Neo4j are going with Cypher. But - if Cypher is

how to return subgraph from gremlin that is in an easily consumable format for Java

此生再无相见时 提交于 2019-12-18 09:48:23
问题 I am very frustrated about very simple things when I try to do a single traversal and bring a lot of stuff from DSE Graph 5.0 at once using Gremlin.. In my simplified case I have: 1 entity with specific uuid entity can have zero (see optional) or more types I need to be able to return the entity and the types What I have so far that works is very ugly :( List list = g.V().hasLabel("Entity").has("uuid","6708ec6d-4518-4159-9005-9e9d642f157e").as("entity") .optional(outE("IsOfType").as("types"))

How to import a CSV file into Titan graph database?

半腔热情 提交于 2019-12-18 03:44:47
问题 Can anyone supply some sample code or hints on how to import a 1MB CSV of nodes, and another 1MB CSV of edges, into Titan graph database running on Cassandra? I've got small CSV files importing via Gremlin, but this doesn't seem appropriate for large files. I've seen Faunus can do this, but I'd like to avoid spending a couple of days setting it up if possible. It looks like BatchGraph might be the way to go (https://github.com/tinkerpop/blueprints/wiki/Batch-Implementation) but the example

Graph/Gremlin for social media use case

耗尽温柔 提交于 2019-12-17 21:17:43
问题 Consider instagram feed scenario. I want to get all the posts 'posted' by the people I follow. For each of these posts I want to know whether I have liked it or not and also know which of the other people I follow have liked it (if any). What is the best solution to get this in gremlin (possibly avoiding duplication)? Image for clarity The following just gives the posts 'posted' by USER 2. How to get other information in the same query? g.V().has('ID','USER 2').out('posted') 回答1: When you ask

Gremlin - Choose one item at random

蹲街弑〆低调 提交于 2019-12-16 20:01:39
问题 Consider me as 'user' 1. The aim of the query is to get the posts 'posted' by the people I follow and for each of those posts check: Whether it has been liked by me Whether it has been liked by anyone else that I follow and if yes choose one of those users at random to return Sample data: g.addV('user').property('id',1).as('1') addV('user').property('id',2).as('2'). addV('user').property('id',3).as('3'). addV('user').property('id',4).as('4'). addV('post').property('postId','post1').as('p1').

Unable to print node properties in DSE graph

我只是一个虾纸丫 提交于 2019-12-14 03:29:08
问题 Apologies as this might be very basic question on the topic but I am new to Gremlin/DSE Graph and i tried many ways to extract data i am inserting to my graph but somehow i am unable to make it work. Here is what i have: 1. Graph with allow_scans set to true 2. Schema with propertyKey and vertexes defined and materialized index on NodeID of all Vertexes. There are no relationships right now, just vertexes with data points. I wrote a program to insert all my nodes to DSE Graph which is working

How to get an attribute named ID in gremlin

这一生的挚爱 提交于 2019-12-14 02:32:48
问题 I'm getting weird results while writing a gremlin query. I can happily use the has function for most of the attributes for my nodes, for example " ().has('name', 'VerisignCzagExtension').property('id')" will return v5086. But when I attempt to use the has function with the attribute id it never returns true. for example " ().has('id', 'v5086').property('id')" returns no results. Anyone have any idea why this is happening? Thanks. 回答1: Internally, Neo4j stores all IDs as java.lang.Long objects

Connection of Titan graph DB to Gephi through Gremlin console

跟風遠走 提交于 2019-12-13 21:18:18
问题 I am trying to connect to gephi(0.9.1) through gremlin console. I have a graph in my titan database. I also have the streaming server enabled in my gephi. And through gremlin i executed the following commands: :plugin use tinkerpop.gephi g = TinkerFactory.createModern() :remote connect tinkerpop.gephi All these worked fine.But when i ran the last command: :> g I got the following error: ==>tinkergraph[vertices:6 edges:6] 16:07:16.783 [main] DEBUG groovyx.net.http.HTTPBuilder - POST http:/

Does Cosmos DB support Gremlin.net c# GLV?

房东的猫 提交于 2019-12-13 20:12:43
问题 I cannot find this information, and also I cannot find examples on how to use Gremlin.net c# GLV with a remote Cosmos DB graph. Someone knows anything about this? Thanks! 回答1: Currently CosmosDB does not support GLV's as they do not yet have Bytecode support. They have told me that they are working on it and expect it to be available soon. 来源: https://stackoverflow.com/questions/49512146/does-cosmos-db-support-gremlin-net-c-sharp-glv

Azure CosmosDB (Gremlin API), How to connect using Gremlin.Net

不问归期 提交于 2019-12-13 16:51:21
问题 I am trying to use the Gremlin.Net NuGet package to connect to Azure CosmosDB (Gremlin API), using the Package https://www.nuget.org/packages/Gremlin.Net On Azure Portal, I can obtain the Key (used on CosmosDB client NuGet packages: Microsoft.Azure.DocumentDB and Microsoft.Azure.Graphs) How can I obtain the ssl, port, username and password credentials to connect to Azure CosmosDB (Gremlin API) for use on the Gremlin.Net NuGet package? 回答1: Since you are connecting to the public port of the