J'ai essayé sandbox avec neo4j. J'ai frappé le sandbox neo4j avec python et j'ai essayé d'obtenir les données essentielles.
from neo4j import GraphDatabase, basic_auth
driver = GraphDatabase.driver("bolt://18.233.67.98:32829", auth=basic_auth("neo4j", "convenience-patient-function"))
session = driver.session()
cypher_query = '''
MATCH (n)
RETURN n.id, n.tosi, n.tiku, n.sex, n.date
'''
results = session.run(cypher_query, parameters = {})
print("id tosi tiku sex date")
for r in results:
print ("%s,%s,%s,%s" % (r["n.id"], r["n.tosi"], r["n.tiku"], r["n.date"]))
from neo4j import GraphDatabase, basic_auth
driver = GraphDatabase.driver("bolt://18.233.67.98:32829", auth=basic_auth("neo4j", "convenience-patient-function"))
session = driver.session()
cypher_query = '''
MATCH (n)-[]-(m)
RETURN n.id, m.id
'''
results = session.run(cypher_query, parameters = {})
print("n m")
for r in results:
print ("%s,%s" % (r["n.id"], r["m.id"]))
c'est tout.
Recommended Posts