I'm brand new to this forum (and to Neo4j actually).
I would like to import a csv data file, with its nodes and relationships onto Neo4j, using a python script.
I have 2 nodes with a few properties, and would like to establish a relationship between them.
By cypher commands on the browser (Chrome, up-to-date) it works fine; it's just super long (the file has 17M lines, I have to split it to do it in Chrome and it's still very long - hence the python import).
I'm cutting the csv file between header and "core" part as requested.
I'm calling the shell commands --import for both nodes and relationships, it works fine for nodes, but breaks for the relationships.
It tells me that the TYPE of the relationship is missing. But I have no idea what it should be, plus where to define it... And in the Neo4j documentation I didn't find a clear anwser about what are the relationship types. Is that different of the label?
Here is the part of my code where I define the relationship between my 2 nodes:
test_rel = node1[node2['common_variable'] != 'NaN'] test_rel['Label'] = 'CREATES' #write data test_rel.to_csv(export_path+'/test_rel.csv',index=False, header=False) #write header with open(export_path+'/test_rel-header.csv','w',newline='') as f: writer=csv.writer(f) writer.writerow([':START_ID','common_variable',':END_ID', ':TYPE'])
And the error I get:
original error: start:B010 (global id space) type:null end:CREATES (global id space) is missing TYPE field
Any idea? I can provide a lot more details if needed, but I don't really know what would be relevant for you guys.