How to connect mongodb to neo4j - mongodb

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

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

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")

Related

Got com.google.inject.ProvisionExceptionerror when using PostgreSQL JDBC on GraphDB - dependency issue?

I'm getting a provision error when using PostgreSQL JDBC on GraphDB. Actually, I created a connection between postgresql and Graphdb by a virtual repository, and I made a ODBC file which includes the RDF mapping information.
Expected: Normaly I can browse PostgreSQL data's hierarchy and so on in GraphDB.
Error: The connection was fine and the repository was created successfully, but when I tried to browse the data, I got this error:
Actions that I did: I did go /opt/graphdb-free/app/lib/plugins/dependencies-plugin/dependencies-plugin.jar to modify the dependency parameter, but it didn't change anything. I did checked the syntax of ODBC file and I don't see anything wrong there.
Anyone have been though this? Was I in the right place to modify the dependency? Or it's something else?

Configuring PostgreSQL on Play! 2.6

I have a PostgreSQL(v9.6) instance running on my machine. The database is called 'postgres'. I've managed to open the application in pgAdmin 3 using localhost:5432. In my Play! application(v2.6.2) I have added the driver and the url to the application.conf file following the tutorial here and I have added the javaJdbc dependency to my build.sbt file. So I have the following:
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://localhost:5432/postgres"
db.default.username = "user"
db.default.password = "pass"
When I run the application though I get this error in the console:
Cannot connect to database [default]
Could somebody explain to me why this is the case? I can provide more information if I need to.
So after quite a bit of digging, it turns out the problem was actually me missing the postgres dependency. If anyone encounters this problem I would suggest checking your build.sbt file and adding the org.postgres dependency if you are missing it.
This documentation on the play website doesn't explain this step.

How do I change an entity framework project to use Microsoft SQL Server

I am trying to debug a program using Entity Framework code first on my personal (work) computer.
We have recently had a domain migration, meaning that the user I log in as now is not the same that I used before. This caused me to loose access to the databases I had on the computer. To get around this, I have uninstalled everything to do with Microsoft SQL Server on the computer, and installed the latest version of Microsoft SQL Server, 2014 - 12.0.4213.0 . I then restored the database I need.
When I first tried to run the program, Visual Studio complained that the project is set up to use SQL Server Express, which was not installed. The recommended solution is to change the project to use SQL Server instead. To do this, I must click on "the database file" and follow the instructions. I have looked through the entire solution. There is a great many files, but I found no good candidate for "the database file."
It seems that my Google fu is not strong enough to find anything about this. So my question is: how do I change the project to use SQL Server?
I also have a second, related question. I tried to solve the problem by installing SQL Server Express. However, when I try to restore the database to this, no base appears in the drop down list. When I try to run the program now, I get another error:
Unable to create the file 'c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\Timelønsblanket.mdf' because it already exists.
I guess that this is also why I cannot restore the database. What I have found in websearches warns that I should not manually delete .mdf files.
Any advice on what to do?
I have solved the problem. All that was needed was a correct connection string. No need to find a "database file".

Why Playframework database configuration error in application.conf

I have have correct PostgreSQL installed and I can use this by other framework such as Spring. When I tried write some code for Play 2.1 that should use postgresql 9.4.1. I'm also using Slick 3.0.
I have following in the application.conf
db.default.driver="org.postgresql.Driver"
db.default.url="jdbc:postgresql:mydb"
db.default.user=myuser

db.default.password=mypass
When I start application it give error:-
Missing configuration [db.ansiDump.driver]
I added
db.ansiDump.driver="org.postgresql.Driver"
db.ansiDump.url="jdbc:postgresql:mydb"
Then I get error:-
Missing configuration [db.unicodeDump.driver]
I added
db.unicodeDump.driver="org.postgresql.Driver"

db.unicodeDump.url="jdbc:postgresql:mydb"
Then I get error:-
Missing configuration [db.dumpPaths.driver]
So again I added:-
db.dumpPaths.driver="org.postgresql.Driver"
db.dumpPaths.url="jdbc:postgresql:mydb"
After all these sequence of driver and url, It worked. I am sure, I am doing something wrong to configure drive o url.
Please tell me what is wrong and how it should be done.
Updated infromation:-
Additional information.
Sorry I can't keep correct format for the whole application.conf file content. So I uploaded it in Google Drive. Please check the link enter link description here
To reproduce the error I had to comment line number 45 #db.ansiDump.driver="org.postgresql.Driver"
After comment I get this exception:-
Configuration error
Missing configuration [db.ansiDump.driver]
In /Users/ma/work/app/conf/application.conf:45
I think the url should be
db.default.url="jdbc:postgresql://localhost:5432/dbName"

Where is mongodb source code in pentaho dpi-5.3 (kettle)?

Here is my problem. I need to use the functions of mongodb defined in kettle source code. As in kettle-5.3 transformation steps, it supports mongodb input and output(in big data). I download the 5.3 version from github, github link. But I can not find the source file of mongodb in the path of "\pentaho-kettle-5.3\engine\src\org\pentaho\di\trans\steps\". Actually, all the steps can be found here.
Could anyone help me find the mongodb files?
And my target is to customize the mongodb input step by using Metadata Injection to rewrite the .ktr file. In this way, users can give the parameters(define the name of the data in mongodb) from outside, such as a web page. Is there any wrong with this idea?
Any suggestion is appreciated!! Thanks!!!
I'm not sure, but I think the sources you need can be found in here:
https://github.com/pentaho/pentaho-mongodb-plugin
The mongo DB steps are a separate plugin, not included in Kettle core.