I have imported my csv files using the neo4j-admin according to the documentation using the following command
/bin/neo4j-admin import --mode=csv --nodes all_nodes_ne_header.csv,all_nodes_ne.csv --relationships all_relations_ne_header.csv,all_relations_ne.csv
the result looks like
IMPORT DONE in 15s 997ms.
Imported:
19354 nodes
11759454 relationships
58062 properties
Peak memory usage: 1.03 GB
and I can see a file called graph.db
in the data/databases
folder.
I go to python and do:
from py2neo import Graph, Node, Relationship, Database
%matplotlib inline
%load_ext cypher
default_db = Database(db = Database())
graph = Graph("bolt://localhost:3637")
and after running my query I get the following:
Format: (http|https)://username:password@hostname:port/db/name
...
ConnectionError: HTTPConnectionPool(host='localhost', port=7474): Max retries exceeded with url: /db/data/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x12e269790>: Failed to establish a new connection: [Errno 61] Connection refused'))
I guess I am not doing the connection correctly within Python and didn't find anywhere in the documentation how to do it. Basically, I have not set any password, username and even don't the port. I generated a report using neo4j-admin report
and there was not anything relevant either. therefore, I appreciate your comments on how I can build the connection and start querying from python.