Questions tagged [graph-databases]
A graph database uses graph structures with nodes, edges, and properties to represent and store information.
2,446
questions
0
votes
1answer
11 views
Cypher query problem when trying to find max of a returned column under certain relation id
I am facing a very strange problem I am calling the same function get_objects() 4 times and getting the max from the returned column, the item 10172 which should be returned as a maximum still present ...
1
vote
1answer
31 views
How to short-circuit a where statement in Gremlin?
I am wondering if it is possible to short-circuit a where statement when finding the first result.
Here is a sample query:
g.V().hasLabel('SEAT')
where(
__.repeat(out('NEXT').simplePath())
...
1
vote
1answer
44 views
How to resolve “Neo4j returned a valid response, however Neo4jClient was unable to deserialize into the object structure you supplied.” error?
I am using neo4jclient graph database with .net core API. I have to add the health checks. I have created my own health check using Ihealthcheck interface. below is my healthcheck class
public class ...
0
votes
1answer
30 views
One Gremlin query to get all connected vertices for multiple vertices
may I get some help from improving our query?
So the idea is that we have many connected sub-graphs, and each vertex has an unique id. Now we know some of ids, and we want to get all of the connected ...
1
vote
2answers
38 views
Neo4j cypher query doesn't return the results as expected into pandas DataFrame
I am trying to pass on the parameter to the cypher query in a function but it is not returning the results as expected. First error was ClientError: {code: Neo.ClientError.Statement.ParameterMissing} {...
0
votes
0answers
30 views
Querying virtual graphs in Neo4j
I'm extending Neo4j with some user-defined procedures.
My procedures return virtual graphs and I'm getting the visualisation that I want, but I'm not able to query from it. The output has a ...
0
votes
0answers
14 views
Key error when adding data to a graph database using Neo4j. What does this error mean?
I'm following this guide: https://towardsdatascience.com/create-a-graph-database-in-neo4j-using-python-4172d40f89c4
and am getting an error message when running the add_authors(authors) and add_papers(...
0
votes
1answer
23 views
How to query Gremlin when multiple connections between nodes are present
I'm trying to build a suggestion engine using Gremlin but I'm having a hard time trying to understand how to create a query when multiple nodes are connected by different intermediate nodes.
...
0
votes
1answer
44 views
Gremlin find lightest path between vertices
I am pretty new to Gremlin and I am trying to find within my graph the lightest paths from source_id vertex to target_id vertex. (On some edges I have weights and on others I don't)
To get the ...
0
votes
1answer
103 views
Gremlin query for getting the order for a “dependency graph” like graph
With the following graph:
g.addV("entity").property(id, "A")
.addV("entity").property(id, "B")
.addV("entity").property(id, "C")
.addV(&...
1
vote
1answer
27 views
arangodb lock file issue
So I downloaded ArangoDB via homebrew yesterday. The documentation said to use the following to get the server started:
/usr/local/Cellar/arangodb/<VERSION>/sbin/arangod &
I ended up using ...
0
votes
1answer
42 views
Query to find node which has only one vertex in common
I have the following vertices -
Person1 -> Device1 <- Person2
^
| |
v
Email1 <- Person3
Now I want to write a gremlin query (...
0
votes
0answers
39 views
Janusgraph gremlin query to find connected components for a particular node
I'm pretty new to graph database and janusgraph, I'm want to write a gremlin query to find connected components for a particular node.
For eg. I have the following nodes -
Person1
Email1
person2
...
1
vote
1answer
31 views
Gremlin: How to efficiently find “roots” in directed acyclic graph?
I'm trying to write a gremlin query that efficiently solves the "confluent rivers" problem (for a lack of a better name, maybe there is one in graph theory?). Here's an example:
The task: ...
1
vote
2answers
21 views
Cypher query to add WHERE clause for nodes that were created within the last 24 hours
I have a query to get all of a specific type of users:
MATCH (users:User {role: "USER", hasCompletedRegistration: true})
RETURN users
And there is a createdAt datetime property. What is the ...
0
votes
1answer
35 views
How do I set up the vertex and edge of the story using azure cosmosDB gremlin?
Trying to save Aesop's Fables Fox and Grapes using azure CosmosDB Gremlin. It tries to store detailed information such as why the fox gave up, where the grapes are, and when. How do I express it with ...
1
vote
1answer
60 views
How to create a graph neural network dataset? (pytorch geometric)
How can I convert my own dataset to be usable by pytorch geometric for a graph neural network?
All the tutorials use existing dataset already converted to be usable by pytorch. For example if I have ...
1
vote
1answer
45 views
How to optimise recursive query - Neo4j?
I am developing a contact tracing framework using Neo4j. There are 2 types of nodes, namely Person and Location. There exists a relationship VISITED between a Person and a Location, which has ...
1
vote
0answers
22 views
AnzoGraph docker support for Mac m1
I have been trying to get AnzoGraph installed through docker in my Mac m1, but it seems this can work only on x86 architecture.
Do you know if there is any other way of having it install in my Mac?
...
0
votes
0answers
72 views
How to get partial subtrees with gremlin
Consider the image of a graph:
enter image description here
How can I query in gremlin to get a tree with at most n vertices per edge type ?
To ask in a different way same problem would be like this:
...
0
votes
1answer
61 views
Contact Tracing Using Neo4j - Some people are not identified
I am developing a contact tracing framework using Neo4j. There are 2 types of nodes, namely Person and Location. There exists a relationship VISITED between a Person and a Location, which has ...
2
votes
0answers
30 views
Graph DB and Relations from Edges
I'm going to design simple knowledge base with Objects, Relations between them and Questions about Objects and Relations. I understand well how to do this in the RDBMS. But now I'm going to study ...
0
votes
1answer
27 views
How to select all the items above threshold or at least the first item?
I have been stuck on this problem for a day and it seems there is no out of the box easy way to do this so here I am.
To replicate the database we can use these queries
CREATE (:Score {value: 0.2})
...
0
votes
1answer
33 views
Graph database vs. RDB with link/bridge tables
I work in the fraud/AML (anti-money laundering) field, and we are exploring using a graph database to unearth hidden connections and links. I've read a fair amount abut graph databases lately (mostly ...
1
vote
2answers
26 views
Product recommendation cypher
I have the following simple graph -
I wish to build a simple recommendation system on the basis of the following example:
Consider that we have invoice 1 with an Article "Apple".
We also ...
0
votes
0answers
25 views
Recursively find all connected nodes and relationships between them starting with one given node in Neo4J PHP/JS
I'm writing this code in PHP/JS and using a Neo4J graph database.
I'm aware the title isn't that clear so I'll elaborate:
Let's say I have node A in my database. Node A is connected to node B and node ...
0
votes
0answers
18 views
Authenticate accounts and passwords in JanusGraph (Gremlin)
Without authentication, security will not be secure. So I need a sample code to authenticate between JanusGraph and .net. * I downloaded JanusGraph console package, but I can't run like the gremlin ...
0
votes
1answer
73 views
Sqllite as graph database
I want to use graph database with multithreading program so i was thinking about sqlite, i need to know if it can support graph database and if there is any graph database that support multithreading.
1
vote
1answer
77 views
Neo4j cypher query results into Pandas DataFrame
I am trying to read the csv file which have nodes ids and their respective relation between them. First two columns represent nodes and third colum represents the relation between them. So far I am ...
0
votes
0answers
16 views
creating nodes and building relationships dynamically by Importing data from json files
I have 3 JSON files namely Network, DataStore and VM. I want to extract the data from JSON files and create nodes and relationships dynamically.I have used the below mentioned query
CALL apoc.load....
0
votes
1answer
13 views
Execute recursive saves together or seperately?
I have a complex graph of objects that I am saving to the database. These objects can each connect to other graphs of a similar type. I wish to save the graph of objects and all of the graphs they ...
1
vote
1answer
26 views
What is exact time in Neo4j execution time?
I am using Neo4j query log analyzer on Neo4j desktop to investigate my performance issue.
In the image, the total for 2nd query is 153281 ms (~ 2.5 mins); but the time for planning, cpu and waiting is ...
0
votes
0answers
24 views
Keep collections dependent on edges in arangodb
how do we enforce a condition that there would be no dangling vertex in a collection. Say fo example I have a social networking platform and I have users and posts documents and HasWritten Edge ...
0
votes
2answers
53 views
Designing and implementing SaaS Application with Muti-tenancy GraphDB (Neo4J / ArangoDB)
I am developing a SaaS Application with the following Technology:
NestJS (Node)
DB (NEO4J, ArangoDB)
Nginx for proxy (Micro-services Approach)
The SaaS Application will be hosting many distinct ...
0
votes
1answer
69 views
Multi-tenancy Architecture in a graph DB
I would like to share my thoughts with you and try to get some advice. I would like to define my application with the best architecture as possible. Any comment would be highly appreciated. Here we go....
0
votes
1answer
56 views
AWS Neptune python gremlin certificate verify failed
I have setup a ssh tunnel from local machine to neptune db and established a connection using endpoint.
ssh -L 8182:***.us-east-1.neptune.amazonaws.com:8182 ****
I see gremlin console work fine and i ...
0
votes
1answer
22 views
Gremlin query hangs with and/or condition
I have a Graph model region (vertex) -> has_person (edge) -> person (vertex). I want to get region vertices that has person with name Tom.
This query works fine:
g.V().hasLabel("person"...
1
vote
1answer
29 views
Implementing contains in typescript + gremlin
In my javascript and gremlin implementation, I am able to use contains with no problem:
const gremlin = require("gremlin");
const __ = gremlin.process.statics;
const findByPartialProperty = ...
1
vote
1answer
78 views
Cypher BFS with multiple Relations in Path
I'd like to model autonomous systems and their relationships in Graph Database (memgraph-db)
There are two different kinds of relationships that can exist between nodes:
undirected peer2peer ...
0
votes
2answers
20 views
Is there any way i can run cypher command starting from :Param using py2neo 2021.0.0
Well, in neo4j i am trying to achieve this simple query to save the sparql keyword to use in later query and graph.run is not allowing me to do it. It is showing a syntax error
graph.run(":PARAM ...
0
votes
0answers
25 views
How to use d3.js on neo4j browser?
I'm trying to visualize a graph using d3.js that I created on neo4j.
I can't understand how to do that. All the documents that I have found are too generic and I still don't know how to start d3.js ...
1
vote
0answers
31 views
SQL Server Graph Database - shortest path using multiple edge types
I have done my research on SQL Server GraphDB, but all the contrived examples I've found so far use only a single edge table. It's always Person-friend_of->Person, for example. In my case, I've ...
0
votes
2answers
36 views
Neo4j/Cypher attempting to UNWIND a list of user ids, create one Notification and relationship to all users that were matched
I have this cypher query:
OPTIONAL MATCH (allMentionedUsers:User)
WHERE allMentionedUsers.id in $mentions
UNWIND allMentionedUsers as mentionedUser
CREATE (n:Notification {
id: apoc.create.uuid(),
...
0
votes
1answer
23 views
How to enforce typing in gremlin/tinkerpop?
In something like SQL, when I create a table I can create type constraints (String with certain lengths, booleans, etc).
How do I do that in gremlin? I am using a javascript implementation, and I know ...
0
votes
0answers
27 views
Neo4j/Cypher return the first element of the list of node labels as a property
I'm attempting to return a single node label as a property in a cypher query. I'm using the GRANDstack, so I'd like GraphQL to ask Neo4j for a list of nodes, each with the label as a property:
query ...
0
votes
0answers
31 views
Loading data into a Tuple using Spark
Can anyone help me understand the below error?
java.sql.SQLException: Processing attribute att_name failed, keylist
has different length with UDT fields at
com.tigergraph.jdbc.restpp....
1
vote
1answer
59 views
How do I combine the output of two return variables into one in ArangoDB?
Beginner with ArangoDB here:
I have two outputs stored in two variables, say: a and b.
The structure of the items in variable a and b are exactly the same, but with different data. Example as follows:
...
0
votes
1answer
72 views
Neo4j Create node if no relationship exists
From the MERGE documentation
MATCH (person:Person)
MERGE (city:City { name: person.bornIn })
MERGE (person)-[r:BORN_IN]->(city)
RETURN person.name, person.bornIn, city
The problem is, I want to ...
0
votes
1answer
18 views
How to process each of the allShortestPaths in Neo4j?
I have a Neo4j graph with several relationships, each of them having property y (number). I want to find all shortest paths between node with name 'x' and all other nodes and then, for each of these ...
0
votes
1answer
18 views
Gremlin query returning graph traversal instead of edges
I have a graph with some vertices that have edges towards each other (parent and child). Based off this question
This is what my code looks like
const showAllRelationships = async (target)=> {
var ...