Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Import date from postgresql to neo4j


I am trying to import data from my local PostgreSQL database to neo4j:


Schema: os

Table: operating_systems

Firstly, I load the JDBC driver into the memory

CALL apoc.load.driver("org.postgresql.Driver")

Then, I run this query to ingest data from postgresql

   WITH "jdbc:postgresql://localhost:5432/graph-test?user=kt&password=mypassword" as url
   CALL apoc.load.jdbc(url,"os.operating_systems") YIELD row AS line
   MERGE (o:Os {name:})
   MERGE (of:OsFamily {name: line.familly})
   MERGE (o)-[:FROM]->(of)

Unfortunately, I received this error.

Failed to invoke procedure `apoc.load.jdbc`: Caused by: Connection refused (Connection refused)

Could this error be caused by the incorrect URL format, jdbc plugin version, or something else?


Can you access postgres with the same connection URL from other JDBC based tools?

Looks ok to me at first glance. If both databases run on your localhost (not docker or so) you might also try putting in or your local ip address. Not sure if postgres blocks access on "localhost" by default and only allows unix-domain-socket access.