0

I have 3 files:

persons.csv

person
bob
boob
booboo

incident.csv

place,address,incident
the bowling alley, '501 mane st.', blocking lanes
house of bob, city park, peeing in public
rodeo bar, '77 sunset', bucking the bronco

day.csv

day
moonday
tuesday
wednesday

Day.csv is my relationship file. fi, I want bob at the rodeo bar on tuesday. I load csv with headers// the person and incident files and create nodes successfully, but adding the relationships doesn't work for me in neo4j 3.5.6 no matter what combinations, including merge, match, create, optional match, etc. that I see suggested to this seemingly common issue, or docs solutions that I try. I'm getting errors, or (no changes, no records), or the creation of new nodes and properties in addition to the existing ones. Suggestions?

load csv with headers from "file:///day.csv" as line
MERGE (a:Person {person: line.person})
MERGE (b:Place{place: line.place, address: line.address, incident: line.incident, })
MERGE (a)-[:DAY {day:line.day}]->(b)

Tried match, merge, create...Match, create... left out props...except on day... etc...

1 Answer 1

1

The day.csv file does not contain any data for the person, place, address, and incident fields. To execute your query, you'd need to add those fields to that CSV file.

Also, you should really only provide the minimum data needed to get the appropriate Place node. For example, if Place nodes have unique place properties, then omit the address and incident fields from day.csv (and from your Cypher code as well).

By the way, you may also want to change the spelling for "moonday".

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.