Integrate or Migrate data from Mongo DB to Neo4j

Hello,

I am new to Neo4j and Mongo DB. I want to import some collections from Mongo DB to Neo4j. I have went through multiple links and blog but couldn't import it.

Procedure 1:
CALL apoc.mongodb.get('mongodb+srv://:@<Cluster_Name>','','',false,'','') yield value

Error:
Type mismatch: expected Map, Node or Relationship but was Boolean (line 1, column 105 (offset: 104))
"CALL apoc.mongodb.get('mongodb://:@<Cluster_Name>/test1','','',false,'','') yield value"

Procedure 2:
CALL apoc.mongodb.first('mongodb://:@<Cluster_Name>','','',{name:'testDocument'})

Error:
Failed to invoke procedure apoc.mongodb.first: Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address:27017=normativedevcluster0-fqz8w.mongodb.net, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: normativedevcluster0-fqz8w.mongodb.net}, caused by {java.net.UnknownHostException: normativedevcluster0-fqz8w.mongodb.net}}]

But same URL I am able to connect from Mongo DB Compass
Any help or suggestions?

Thanks in Advance

Hi @prishabh35 I wrote this article about you to automatically transform Mongodb collections into graphs in Neo4j:

I hope it helps

Thanks for the help!,
Can we do this without Docker?

Sure you only need APOC

@conker84

Could you please identify what mistake I am making?

mongodb+srv://temp_user:@cluster0.tvk5k.mongodb.net/test?authSource=admin&replicaSet=atlas-2zthi9-shard-0&w=majority&readPreference=primary&appname=MongoDB%20Compass&retryWrites=true&ssl=true

call apoc.mongodb.first('mongodb://temp_user:@cluster0-shard-00-01.tvk5k.mongodb.net:27017', 'test', 'test1', {}) yield value
return value

Neo.ClientError.Procedure.ProcedureCallFailed

Failed to invoke procedure apoc.mongodb.first: Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address:27017=cluster0-shard-00-01.tvk5k.mongodb.net, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]

Try with:

call apoc.mongodb.first('mongodb://temp_user:@cluster0-shard-00-01.tvk5k.mongodb.net:27017?retryWrites=true&ssl=true', 'test', 'test1', {}) yield value
return value
``