Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-20-2020 10:31 AM
Hi Everyone! I have a question regarding Data insertion. So I have an adjacency list which has 3 columns: SOURCE, TARGET and EVIDENCE. The SOURCE and TARGET columns contain nodes and the EVIDENCE column contains the relationship as to how a node from SOURCE is related to a node from TARGET. My node relations are inherently undirected. But since Neo4j only accepts directional relationships, I have assured that my adjacency list reflects that: meaning, I have an entry for:
SOURCE: Node1
TARGET: Node2
EVIDENCE: Evidence1
and I also have an entry:
SOURCE: Node2
TARGET: Node1
EVIDENCE: Evidence1
My end goal here is to create a graph and apply graph algorithms to that like finding connected components, max cliques (complete graphs), paths from a node to another node etc.
I want to insert my adjacency list data into Neo4j. I know there are several ways like LOAD CSV, via Cypher Shell. But I want to find a way in which I can insert this data efficiently since my adjacency list has 100 Million records. If there are any ways, please let me know. I did come across one for bulk import which was via neo4j-admin import but I don't really know the syntax to be used for my case. I would highly appreciate it if someone could help me find that. Thanks in advance.
01-20-2020 11:33 AM
I’ll definitely advise you to use the bulk importer, even if it requires some extra preprocessing of your import files. You need to make one CSV with the nodes and one CSV with the relationships 🙂
Dealing with creating millions of relationships using cypher is tedious and slow, unfortunately.
01-20-2020 11:50 AM
Thanks for the response. Would it be possible for you to elicit what would the 2 csv's exactly look like and what will be my neo4j-admin import statement. I am sorry I am very new to this so unable to wrap my head around it. Here is a sample of what my data looks like right now.
All the sessions of the conference are now available online