cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Create relation between nodes (Person)-[:Member]-(Academy)

Somehow I'm lost to create the relation between my nodes I have 3 CSV files trying to connect books to person s and the academies.
I have read and watched a lot's of videos and posts about creating and merging the relations between nodes but I'm still novel to creating them,
I have tried to import my data with ETL tool also with other ways import CSV with headers and so on .. and create the relations: but what I mean is to connect them by Ids and show the info's

MATCH (p:Person),(b:Book)
MERGE (b)-[:WRITE_BY]->(p)
MATCH (p:Person),(a:Academy)
MERGE (p)-[:MEMBER]->(a)
MATCH (b:Book),(a:Academy)
...

It would be great if anyone could help me specifically with my data to create the relations

we should also avoid creating NULL nodes, we have {
itacitemperson.id to itacitembook.ArtistIds,
itacitemacademy.id to itacitembook.AcademyIds
}

Thanks in advance

2X_a_adc007f5952593d1232ce2a0233f3610a27ce6c8.png

2 REPLIES 2

Benoit
Graph Buddy

Can you share the headers of yours CSV ?

If the image correspond to your CSV, then I don't see the join between Person and Academy.

The image is the MySQL diagram, these are CSV headers:

Person.csv

"Id","Surname","Forename","DateText","BirthDate","DeathDate","RecordId","Anagram","Nationality","PersonalTitles","Roles","TypographicalReference","Pseudonyms","Notes","EngraverReference","Name","Gender"

Book.csv

"Id","RecordId","Shelfmarks","SortedShelfmarks","AcademyIds","ArtistId","AuthorIds","CensorIds","CensorsAgreement","Content","DedicationPlace","Illustrations","Marginalia","Pagination","PublicationPlaceItalianNameId","PublicationPlaceFictitiousName","PrinterId","PrinterOrnament","Subjects","ShortTitle","LongTitle","PublicationYear","EditorIds","Formats","Languages","DedicateeIds","IllustratorIds","LibraryLocation","Edition","ContributorIds","Notes","PublicationPlaceLatinNameId","PublisherId","EngraverReference","PublicationPlaceEnglishNameId"

Academy.csv

"id","Name","StartDate","EndDate","DateText","Motto","Notes","EmblemDescription","RecordId","CityId","Roles","Alternativename","CityItalianName","CityEnglishName","CityLatinName"

Member.csv

"id","nickname","academyId","memberEmblemDescription","motto","personId"