Questions tagged [memgraphdb]

Use this tag for questions related to Memgraph streaming graph database.

Memgraph is an open source graph database built for real time streaming data, compatible with Neo4j. It is an in-memory graph database that uses Cypher as a query language. Memgraph can be extended with graph algorithms that are part of Memgraph Advanced Graph Extensions (MAGE). Graphs can be visualized using Memgraph Lab application.

390 questions
1
vote
1 answer

Can I bulk delete one node property for all nodes?

I got the data model that has three nodes that are connected with three relations. This is my data model By looking at the model it makes no sense to me to store both 2 and 3 letter codes for each Country so I would like to delete all 2 letter ISO…
GiteNator
  • 25
  • 6
1
vote
1 answer

Adding SORT after YIELD produces no results or errors

If I run this code CALL pagerank.get() YIELD node, rank; everything works like a charm. But If I expand the query just a little with sorting it gets stuck. CALL pagerank.get() YIELD node, rank ORDER BY rank DESC; I don't get any results or errors.…
Taja Jan
  • 942
  • 1
  • 1
  • 11
1
vote
1 answer

Can two way relation be created in single CREATE query?

When I have two nodes that are connected in both directions, I use two create queries to connect them: MATCH (london:City {name: "London"}) MATCH (dublin:City {name: "Dublin"}) CREATE (london)-[:Flight {length: 450}]->(dublin) CREATE…
Juliette Gia
  • 126
  • 6
1
vote
1 answer

Why do I neeed to use new variable after unwinding in Cypher?

I've been playing around (learing) with Cypher. I've created a query that will return list of the cities that are between 190 and 200 distnace units away from London. This is the code: MATCH path=(:City {name: "London"})-\[:Road \*…
Juliette Gia
  • 126
  • 6
1
vote
1 answer

Can I print out somehow result of rand() function called from Cypher?

I have the following code: MATCH (:City {name: 'London'})-[road:Road]->(city:City) WHERE NOT city.name IN ['Islington', 'Wembley'] RETURN city.name ORDER BY road.length ASC LIMIT 1 + toInteger(7*rand()); On each run I get differnt number of…
Juliette Gia
  • 126
  • 6
1
vote
1 answer

I want to run Memgraph using WSL but I can't install Ubuntu 22.04 on Windows 11

In the Memgraph official documentation it says "Install MemgraphDB using the latest Memgraph Ubuntu package and by running the following command in the Ubuntu terminal.". On the download page there are three Ubuntu versions, 18.04, 20.04, and 22.04.…
Juliette Gia
  • 126
  • 6
1
vote
2 answers

Regular expression on the string of a property name in Cypher

I know it is possible to use regular expressions for property values like for example: MATCH (n) WHERE n.SomeProperty =~ 'somestring*' RETURN n; What i want is to use regular expression on the property name and check for all the properties which…
L.Rex
  • 427
  • 5
  • 12
1
vote
1 answer

How create node using gqlalchemy in neo4j?

I tried to create node and relationship using gqlalchemy in neo4j as per the memgraph documentation but it did not worked from gqlalchemy import Memgraph, Node, Relationship, Field,Neo4j from typing import Optional db = Neo4j(host="localhost",…
Mathi
  • 45
  • 6
1
vote
1 answer

Is there in Cypher sometihg like RETURN all?

I have a code MATCH (n1)-[r:CREATED_ON {manufactureDate: '11-03-2021'}]->(n2) RETURN n1, r, n2; Is there a shorthand to replace RETURN n1, r, n2; that would be equivalent to saying, "Return me all values of all nodes and relationships"? Like RETURN…
user20833054
1
vote
1 answer

How to find all nodes between two nodes in graph database?

I`m using Cypher query language and I need to find nodes between node A and E. (A->B->C->D->E) Next query returns all nodes including A and E, but i need to exclude them, to have B, C, D nodes. How can I filter my query result? MATCH p=…
1
vote
1 answer

Can I connect to Memgraph Cloud using Rust?

I'm wondering if I can connect from Rust to Memgraph Cloud. If it is important, I'm using a free version of the Memgraph Cloud at the moment.
KWriter
  • 1,024
  • 4
  • 22
1
vote
0 answers

Return variable state before WHERE in Cypher query

Consider the following query where some items are merged into the database and where one of the properties is converted into a relationship (all in one go): # items=[{id: 'a', experiment: 1}, {id: 'b'}] UNWIND $items AS item MERGE (x:Item { id:…
BorjaEst
  • 390
  • 2
  • 11
1
vote
1 answer

Can I have two RETURN clauses in Cypher query?

I'm going through my first tutorial on Memgraph Playgound. In one od the lessons there is the following code: MATCH (jon:Character { name: "Jon Snow" })-[killed:KILLED]->(character:Character) RETURN jon, killed, character; From the graph and the…
KWriter
  • 1,024
  • 4
  • 22
1
vote
1 answer

What would be GQLAlchemy, Python, way to create relationship in graph database?

In Cypher, when I create a relationship, I use CREATE clause. To show that there is a connection between the two cities, I would use something like: CREATE (:City {name: 'London'})-[:CONNECTED_WITH]->(:City {name: 'Dublin'}); How can this be done…
KWriter
  • 1,024
  • 4
  • 22
1
vote
1 answer

How can I create nodes in Memgraph directly from Python?

I have an application that uses Memgraph. At the moment, queries are written using Cypher. I'd like to move them to Python. What would be the equivalent of Cypher clauses CREATE (e.g.CREATE (:City {name: 'London'});) and MERGE (e.g. MERGE (:City…
KWriter
  • 1,024
  • 4
  • 22