have 5 nodes > DF1 with property (name1,value1,category1,class1),
DF2 with property (name2,value2,category2,class2),
Issue with property (issue_sev,issue_sev_value),
Risk with property (risk_sev,risk_sev_value),
Recomondation with property (reco_category,reco_sev,reco_sev_val,reco
_class,reco_type)
df1 is connected to df2 with relationship1
df2 -> issue with relationship2
issue->risk with relationship3
risk->recomondation with relationship4
Relationship_1 Df2 Name_2 Value_2 Category_2 Class_2 they have empty cells.
CSV FILE---->
i tried this query but it is wrong and couldnt get req. o/p.
i was trying to make 5 nodes Df1 Df2 Issue RiskEntity Recomondation but im confused !!!
load csv with headers from "file:///test_1.csv" as row
call{
with row
with row where row.Df1 is not null
merge(n1:Person{Data:row.Df1,Name:row.Name_1,Value:row.Value_1,Category:row.Category_1,class:row.Class_1})
}
call{
with row
with row where row.Df2 is not null
merge(n2:Person{Data:row.Df2,Name:row.Name_2,Value:row.Value_2,Category:row.Category_2,class:row.Class_2})
}
call{
with row
with row where row.Issue is not null
with row where row.Issue_Sevirity_Value is not null
merge(n3:person{Data:row.Issue,issue:row.Issue_Sevirity,isseVal:row.Issue_Sevirity_Value})
}
call{
with row
with row where row.RiskEntity is not null
merge(n4:person{Data:row.Risk_Entity,risk:row.Risk_Severity, riskSev:row.Risk_Severity_Value})
}
call{
with row
with row where row.Recommendation is not null
merge(n5:person{Data:row.Recommendation,reco:row.Reco_Category,recoSev:row.Reco_Severity,recVal:row.Reco_severity_value,recClass:row.Reco_Class})
}
call{
with row
with row where row.Df1 is not null and row.Df2 is not null
match(n1:Person{Data:row.Df1,Name:row.Name_1,Value:row.Value_1,Category:row.Category_1,class:row.Class_1}), (n2{Data:row.Df1,Name:row.Name_2,Value:row.Value_2,Category:row.Category_2,class:row.Class_2})
CALL apoc.create.relationship(n1, row.Relationship_1,{}, n2) yield rel
return rel
}
return rel