The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Connecting neo4j graph database to RapidMiner
batstache611
Member Posts: 45 Maven
Has anyone tried to connect neo4j with RapidMiner before? There is very little to read on this subject from google searches. There are jdbc drivers available for neo4j but I'm not exactly sure how to get RapidMiner to use those drivers to connect to the database. This is the link to neo4j jdbc drivers -
http://neo4j-contrib.github.io/neo4j-jdbc/
Thank you.
Tagged:
0
Answers
I've never done this but I would follow: http://docs.rapidminer.com/server/administration/creating-connections/creating-db-conns.html
I believe one our Wisdom presenters (Rel8ted) did connect Neo4j to RapidMiner.
Thank you Thomas,
I sent them an email (info@rel8ed.to) however one of their data analysts replied saying that while they use neo4j, they do not use it from inside RapidMiner...
To connect RapidMiner to Neo4j use the following process using the Neo4j JDBC/Bolt driver.
1) In RapidMiner Connections menu: select "Manage Database Drivers"
2) Add a "Neo4j" Database driver like in the following picture
JDBC Bolt connections to Neo4j are supported from Neo4j version 3 and onwards.
See https://github.com/neo4j-contrib/neo4j-jdbc
3) Drag and drop the "Read Database" operator in the RapidMiner process as shown in the following picture.
Please note that in the "Read Database Parameters" tab I selected the previously defined/named "Neo4j" database driver as the "connection" Parameter.
4) Select in the "Read Database Parameters" tab the "Build SQL Query" button.
5) Insert a Cypher query as a (pass through) "SQL Query" like in the following picture.
Please note that in my Neo4j graph database "Organization" is a Node label and "guid" a Node property.
Replace these with your own Node labels and properties.
6) Select in RapidMiner "Run current process"(F11).
You should see a resultset as demonstrated in the following picture.
You don't have to enable "Beta Mode" in RapidMiner as shown in the picture. "Beta Mode" is shown in the picture because I was previously experimenting with RapidMiner beta functionality (H2O operators) in RapidMiner.
That's all!
Now you can use Neo4j Cypher MATCH/RETURN resultsets as input for RapidMiner operators/processes.
Please note that the resultset is a flattened table created from the Neo4j Cypher MATCH/RETURN subgraph. The graph structure is gone, it's flattened into a table.
The graph structure is gone, it's flattened into a table formatted resultset.