Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-25-2021 09:32 PM
Hi Team,
I have been working hard on this below issues and need your suggestion on this:
Scenario:
I already have the Schema/model in my Neo4j and I want to load data into the same.
For example - from the above screen shot: I have node "Load" and "Customer" with relation "Granted". Now I wanted to load the data from CSV on this node.
Is it possible to do ?
Thanks & Regards
Vikash
07-25-2021 09:49 PM
It's very unclear of your requirement. From your screenshot, what's 'Class' and 'Resource' and what's that you want to load from your .csv? Also, there is no node with label : "Load"
07-25-2021 10:33 PM
My Sincere apology for this,
Actually , there is "Class" Node , and if I click at "Class", then I get these labels - "Customer" and "Loan".
I have CSV file with column "Loan" and "Customer" . I want to load the CSV on to these labels inside "CLASS" node which is "Loan" and "Customer".
At the same time, I wanted to make use of the same relationship between them and that is - "Granted".
The data look for the "Loan" label inside class:
Please let me know , if I am making myself clear.
07-25-2021 10:56 PM
This means you have a node with multiple labels: "Class" and "Resouce" and this node has two properties: name and label being equal to "Loan". From your screenshot, you have another node with label "Loan" and is connected to "Customer" node via "Granted" relationship. Please post couple of rows of your .csv file and the Cypher query you are using under your LOAD CSV call.
07-26-2021 12:07 AM
Thanks a ton for your kind response.
Your assumptions are right and to be more precise:
"Class" is one Node and it has various properties like "Loan" and "Customer"
Below is the screen shot:
and the relationship between them:
Sample data from Customer CSV file:
Sample data from Loan CSV file:
For Sample Cypher:
Actually I wanted to know, if this is correct approach and is it possible to do.
Kindly advice me .
Thanks & Regards
Vikash Kumar
07-26-2021 09:40 AM
Simplest is to create Customer and Loan nodes:
MERGE (a:Customer {name: "Vikash", id: toInteger("10120")})
MERGE (b:Customer {name: "Roxy", id: toInteger("10305")})
MERGE (c:Loan {amount: 1000, loanid: toInteger("10001")})
MERGE (d:Loan {amount: 1500, loanid: toInteger("10002")})
MERGE (a)-[:IS_GRANTED]->(c)
MERGE (b)-[:IS_GRANTED]->(d)
All the sessions of the conference are now available online