Questions tagged [py2neo]

Py2neo provides Python bindings for the Neo4j graph database via its REST web service interface.

Py2neo provides Python bindings for the Neo4j graph database via its REST web service interface. With more detailed information available from py2neo.org, the source code can be found on GitHub and an installable package from the Python Package Index.

The library provides both in-depth support for the Cypher query language as well as the Geoff graph data notation.

729 questions
0
votes
1 answer

py2neo cypher create several relations to central node in for loop

just starting out with neo4j, py2neo and Cypher. I have encountered the following problem and google and my knowledge of what to ask have not yet given me an answer or a helpful hint in the right direction. Anyway: Problem: I don't know how to, in…
Jonas Malm
  • 430
  • 3
  • 9
0
votes
0 answers

Batch Neo4J transaction batch

I'm trying to create large graphs with py2neo (v3). I am using transactions to be able to rollback any changes in case of errors. However, the error that is causing rollbacks is that Java is running out of memory (java.lang.OutOfMemoryError: Java…
Wouter Coebergh
  • 804
  • 1
  • 6
  • 20
0
votes
1 answer

tagging a historic post in py2neo

If I use selector.select to select a historic post by its timestamp & then try to create a new tagged relationship with the historic post it turns out that the historic post isn't actually tagged! However, a greyed-out circle containing the same…
user1613312
  • 374
  • 2
  • 15
0
votes
1 answer

How to create multiple node via looping in py2neo for neo4j

Kindly help me to resolve this issue. I am following the tutorial on this link: https://www.kernix.com/blog/an-efficient-recommender-system-based-on-graph-database_p9 . I am unable to modify the following so that it could comply with the new format…
HuongLeY
  • 1
  • 1
0
votes
0 answers

Why do some relationship merge queries fail in Neo4j?

I set up a Neo4j instance (3.2) both on my local machine (with brew) and on a remote machine (with Docker). I'm trying to run a query, for which I use py2neo functions (merge on the relationship) which create the Cypher automatically. I define two…
0
votes
1 answer

Performance issues building graph with py2neo transactions

I'm trying to build a full binary tree of variable depth using py2neo. I've been trying to use py2neo transactions to send create statements to the server, but the runtime awful. Building a tree with depth 8 (255 nodes) takes about 16.7 seconds -…
SharadV
  • 1
  • 1
0
votes
1 answer

Py2neo V3 path query return unreadable

I have a query to Neo4j through Py2neo v3 using ogm: output = graph.run("MATCH (m:Column { name: 'code' }),(n:Column { name: 'locale_language_cd' }), p = shortestPath((m)-[rels:PART_OF*]-(n)) RETURN p").evaluate() print(output) This correctly does…
Tim Kralj
  • 21
  • 3
0
votes
3 answers

Find shortest path between list of nodes in single query Neo4j

I have two lists ['avia', 'paul', 'tom'] ['james','bond'] I am tring to find the shortes path between avia -> james paul -> james tom -> james avia -> bond paul -> bond tom -> bond i create the query with in two loops and query neo4j every…
user2478236
  • 691
  • 12
  • 32
0
votes
1 answer

Neo4j - too slow writing speed for importing log files in real-time?

I'm trying to find out if network traffic log files can be analyzed with Neo4j. Therefore, I am "tailing" 3 different log files from Bro IDS in real-time using "sh"-library and importing the log records into neo4j which seems to be very slow using…
L Stetson
  • 3
  • 3
0
votes
1 answer

py2neo v3 cypher keyError

I'm a newbe with py2neo. Trying to create a cypher statement to which includes some sort of selection like query = 'MATCH (p:Person {name:"Alice"}) - [r] - b) RETURN p,r,b' res = Graph.run(query) I'm getting a KeyError: 'name' Running the…
skibee
  • 1,279
  • 1
  • 17
  • 37
0
votes
2 answers

Reading values from Json file

I am trying to read an attribute from a Json file using this: d['text']['entities']['mention'][0]['screen_name'] Json File { "text" : { "content" : "@narendramodi Did u even know the fare of metro has been increased by 65%", …
Aman Kumar
  • 137
  • 1
  • 1
  • 8
0
votes
1 answer

py2neo.database.status.CypherSyntaxError: Variable not defined

I'm trying to export data from python to neo4j db using py2neo package. I've a dataframe'ranked_conts' containing a number content is which are string and their corresponding ranks which are in float. my code is findnode =…
Nayana Madhu
  • 1,185
  • 5
  • 17
  • 34
0
votes
1 answer

Neo4j : Creating relationship from CSV file is really slow with py2neo

I've tried to load a CSV file (25 Mb size, 150 000 rows) which contains 22 columns into a neo4j graph using py2neo flights modelization. The cypher query is used in one query and contains nodes and relationships creation between the nodes (Airport,…
filipyoo
  • 347
  • 1
  • 7
  • 15
0
votes
1 answer

py2neo execute cypher to find path

i use py2neo to find get path ,my function like this : -----------------------my funciton ----------------- def findrelationall1(graph_db,startmobile,endmobile): querystring='''MATCH(catelyn:Person {usernbr:%s}), (drogo:Person…
zhaowei
  • 5
  • 3
0
votes
1 answer

Creating relationship queries in py2neo.ogm

I am using the py2neo.ogm api to construct queries of my IssueOGM class based on its relationship to another class. I can see why this fails: >>> list(IssueOGM.select(graph).where( ... "_ -[:HAS_TAG]- (t:TagOGM {tag: 'critical'})")) Traceback…
ChrisGuest
  • 3,398
  • 4
  • 32
  • 53