I am using the Neo4j Import Tool to import large datasets to my existing graph. When importing .csv data to my graph i get
Directory '...' already contains a database.
Github suggests the following solution:
"If you see Input error: Directory 'neo4j-community-
3.0.3/data/databases/graph.db' already contains a database, delete the
graph.db directory and try again."
So I have to delete my graph and a new one will be created. I tryed - it works.
But how can I add Data to an existing database, so without deleting mine?
Thanks!
Using the neo4j-admin import tool With this type of import, the source data is in CSV format. The benefit of importing with this tool is that it is much faster than doing it with Cypher, APOC, or via a driver. The database is created as part of the import and it is done "offline".
To import data from a CSV file into Neo4j, you can use LOAD CSV to get the data into your query. Then you write it to your database using the normal updating clauses of Cypher. A new node with the Artist label is created for each row in the CSV file.
By default, this database is set to neo4j , but you can use the --database=<database> option to import your data into a different database. The user running neo4j-admin import must have WRITE capabilities into dbms. directories. data and dbms.
Import tool is only for newly created databases.
You can use LOAD CSV cypher command to load into an existing database. Other tricks are here: https://neo4j.com/developer/guide-import-csv/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With