Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-16-2019 12:05 PM
Hello,
I want to import relationships from a CSV file. I have extracted the two relevant columns (there are more):
I have already created the nodes that correspond to the first and second columns ('Associations
and 'tags'), and these columns contain identifiers of these two kind of nodes.
Examples of relationships:
ArochaCH --> #chrétiens
Alliancesudfr --> #à_gauche, #activistes
(some Associations have several tags!)
Why this layout with blanks ? The blank cells in the first column make it more readable for humans and the fact of using different cells for each tag, rather than a comma-separated list, allows for a validation filter in google sheets (the source).
However, I do not know how to import these relationships successfully with LOAD CSV, row by row, because of the blank cells.
-> Perhaps there is a neo4j command to indicate that the value of blank cells is the same as the first-non-null value above (e.g., cell 7 should be understood as "Alliancesudfr")
-> Perhaps there is a more standard format for the EXCEL, which is user-readable and robust (with validation)
Many thanks in advance!
12-16-2019 08:37 PM
When you are trying to load csv file into neo4j then whenever a row encounter new line character it considers new row(complete dataset). In the new line when it see blank then that creates null node.
Even in excel the architecture of one person with multiple tags come differently.
try either
12-17-2019 08:35 AM
Thank you for your answer.
12-17-2019 10:20 AM
I suggest is to use Python and fill each name appropriately. You can achieve using pandas.
Once your data set is ready either you use merge clause to load the nodes Or match to load the nodes and relationship and then merge node using APOC so that you have one user with multiple edges for their tags.
All the sessions of the conference are now available online