Gayathri
Gayathri

Reputation: 1

How to connect mongodb to neo4j

I am trying to connect mongodb data to neo4j. I tried with this code "CALL apoc.mongodb.get('mongodb://localhost:27017','test','test',{name:'testDocument'})" in Neo4j. But I get an error as There is no procedure with the name apoc.mongodb.get registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed. I had added APOC jar files in Neo4j plugins and I gone through this link http://indexoutofrange.com/Neo4jStoredProceduresWindows/

still Iam unable to connect. can someone please explain what shall i do to get this started. Thanks

Upvotes: 0

Views: 888

Answers (2)

Adam
Adam

Reputation: 13

I know this was made 5 years ago but this is for anyone else (like myself) who's looking for an answer.

The URI should look something like this:

CALL apoc.mongo.find("mongodb://localhost:port/databaseName.collectionName")

Upvotes: 1

William Lyon
William Lyon

Reputation: 8546

In addition to copying the APOC jar file to $NEO4J_HOME/plugins you'll also need to copy the mongo specific jar files into $NEO4J_HOME/plugins. For example:

mvn dependency:copy-dependencies
cp target/dependency/mongodb*.jar target/dependency/bson*.jar $NEO4J_HOME/plugins/

More information available in the docs here

Upvotes: 1

Related Questions