Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-10-2020 10:09 AM
Currently conducting a project on crime and I am not entirely sure how to go about this.
Currently, the only way I have learned to import is utilizing multiple csv files to create a graph. However, I end up being limited by the relationship being created. I do not want to make 10 different relationship csv files.
My data format in my csv is currently as follows:
Columns 1 through 3:
node_id, node_label, entity_value
Columns 4 through 6
source, relationship,destination
An example two full rows of the csv file:
id, label, entity_value, src, relationship, dst
FBI, GovOrg, FBI, FBI, INVESTIGATED, FI1
FI1, FinancialInstitution, Fin Inst#1, FI1, CASH_DEALINGS, P12
I have also attached a csv file underneath as well with three samples.
The idea is that each node is created as such
CREATE {:Label {entity_value: entity_value, id:id}}
Then the relationships are just created with the IDs, merging uniquely so that there are not any duplicates on import.
Please keep the following things in mind:
Neo4j Version: 4.1
Libraries Used: APOC, Graph Data Science Library
08-10-2020 11:54 AM
One problem I see is the empty space after comma both in the headers and data rows. Enclosing headers and data columns with the back tic will solve this.
Example: entity_value: lTrim(row.`entity_value`)
All the sessions of the conference are now available online