Please I am creating somewhat of a tree diagram for columns only-from a csv file. From the code I have written so far, it worked, but then I am looking for a shorter way to execute the same thing. any suggestions.
load csv with headers from 'file:///company.csv'as row
with row where row.Id is not null
with row where row.Location is not null
// create a mainsource node
merge(d:Dataframe{name:"Data Ware House"})
// create sub-caegories in the dataware house
merge(s1:Company{companyId:"Company Id"})
merge(s2:Cname{companyname:"Company Name"})
merge(s3:Clocation{companylocation:"Company Location"})
merge(s4:Cemail{companyemail:"Company email"})
merge(s5:Cbusinesstype{businesstype:"Company Business Type"})
// connects the subsections to the main node
merge(s1)-[r1:is_in]->(d)
merge(s2)-[r2:is_in]->(d)
merge(s3)-[r3:is_in]->(d)
merge(s4)-[r4:is_in]->(d)
merge(s5)-[r5:is_in]->(d)
//show the compositions of s1-s5 in a node form
merge(ci:company{companyId:row.Id})
merge(ci)-[r1ci:available_in]->(s1)
merge(cn:cname{companyname:row.Name})
merge(cn)-[r2cn:available_in]->(s2)
merge(cL:cLocation{companyLocation:row.Location})
merge(cL)-[r3cL:available_in]->(s3)
merge(cE:cEmail{companyEmail:row.Email})
merge(cE)-[r4cE:available_in]->(s4)
merge(ct:ctype{companyEmail:row.Email})
merge(ct)-[r5ct:available_in]->(s5)