Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-02-2022 09:19 PM
Hi,
I want to upload 2 different MySQL databases into one neo4j db using APOC, how should I get started? Please keep in mind I do not want to use fabric to query across multiple neo4j instances, for purposes of visualizing the whole db for the project I'm working on.
Thank you,
Christopher
01-03-2022 01:47 AM
There is an post on it here:
But a short answer is download the jar connector file from here:
https://dev.mysql.com/downloads/connector/j/
Add it to the Neo4j dbmss-*****/plugins
directory. Restart database.
Run this to list all tables in the database dbname:
call apoc.load.jdbc("jdbc:mysql://localhost:3306/dbname?user=dbuser&password=dbpassword",
"SELECT table_name,TABLE_ROWS
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'dbname'")
yield row
with row,toInteger(row.TABLE_ROWS) as antal
where antal>0
return row
01-03-2022 06:25 AM
Hi,
Thanks for the response. It looks like this is how to get started on one -> one import. Which is great. Will I be able to simply do that twice to get both of the 2 different MySQL databases into a neo4j db?
01-03-2022 07:34 AM
Yes you can.
However this simple aproach does not consider the relationships.
If you want them automated as well you could try the ETL tool for Neo4j.
01-03-2022 09:04 AM
In ETL Tool when I try to import 2 db's at once it only lets me import one at a time. (Please see picture attached)
Do you mean to import them sequentially? So import one first, then go back and import the other?
01-03-2022 10:50 PM
Haven't used Etl myself yet.
But if it is possible to run them sequentially. I don't see it as a problem.
If performance is a problem. Then you have to find away to run them in parallell threads.
Maybe with another tool.
Not sure how big the boost will be though.
01-03-2022 11:38 PM
Hi
You can write stored procedures in Sql server and invoke them in Cypher query language.Please refer cypher card for more details.
I guess that would be better in my opinion
Thanking you
Sameer Gijare
All the sessions of the conference are now available online