Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-13-2022 01:28 AM
I have a big table with transaction records. It has 2 columns, one is FROM and the other is TO. I want to do community detection but don't know how to construct the nodes and relationships automatically with the transaction records. All the examples are about matching with relevant properties or manually creating nodes and connections. How to import the CSV file could I generate all the nodes and transaction relationships all at once? Is there an example I can refer to?
Solved! Go to Solution.
09-13-2022 02:35 AM
You need to create a data model, then create an import script to reads your data from a csv file and relates the nodes and relationships according to your data model.
What kind of entity does the ‘from’ column column relate to, and the same for the ‘to’ column? These descriptions would correspond to your node labels. You could have a something like HAS_TRANSACTION as your relationship type.
Do the ‘from’ and ‘to’ entities have properties describing each that you also need to save? These need to be included in the spreadsheet.
we can try to assist if you provide more details. In the meantime, you can read this on importing. You may also want to look into taking some of the fundamental GraphAcademy classes.
https://neo4j.com/docs/cypher-manual/current/clauses/load-csv/
09-13-2022 02:35 AM
You need to create a data model, then create an import script to reads your data from a csv file and relates the nodes and relationships according to your data model.
What kind of entity does the ‘from’ column column relate to, and the same for the ‘to’ column? These descriptions would correspond to your node labels. You could have a something like HAS_TRANSACTION as your relationship type.
Do the ‘from’ and ‘to’ entities have properties describing each that you also need to save? These need to be included in the spreadsheet.
we can try to assist if you provide more details. In the meantime, you can read this on importing. You may also want to look into taking some of the fundamental GraphAcademy classes.
https://neo4j.com/docs/cypher-manual/current/clauses/load-csv/
All the sessions of the conference are now available online