3

I've watched Nicole White's awesome youtubeUsing LOAD CSV in the Real World” and decided to re-create the neo4j data using the same method.

I’ve cloned her git repo on this subject and have been working this example on the community version of neo4j on my Mac.

I’m stepping thru the load.cql file one command at a time pasting each command into the command window.

Things are going pretty good- I’ve got a bunch of nodes created. To deal with null values for sub_products and sub_issues in the master file, I created two other csv files: sub_issues.csv and sub_products.csv as described in the video.

But when I try reading ether these files, I get "(no changes, no rows)”

somehow I get the impression there is something wrong…

below is the actual command sequence I used for the incremental read.

    // Load.
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS
FROM 'file:///Volumes/microSD/neo4j-complaints/sub_issue.csv' AS line
WITH line 
WHERE line.`Sub-issue` <> '' AND
      line.`Sub-issue` IS NOT NULL

MATCH (complaint:Complaint { id: TOINT(line.`Complaint ID`) })
MATCH (complaint)-[:WITH]->(issue:Issue)

MERGE (subIssue:SubIssue { name: UPPER(line.`Sub-issue`) })
MERGE (subIssue)-[:IN_CATEGORY]->(issue)
CREATE (complaint)-[:WITH]->(subIssue)
;
Timothy Lombard
  • 917
  • 1
  • 11
  • 31
  • I'd suggest stripping out some of the later statements and doing a "RETURN identifier1, identifier2" etc. to see what the engine is doing. – Tim Kuehn Apr 25 '16 at 22:02
  • 1
    Thank you Tim Kuehn your suggestion led me to discover that I left out a step. In other words, make sure you have all of the nodes you think you should have. Making relationships to nodes that don't exist will give you this error. If you make this an answer and I will accept it as a solution. – Timothy Lombard May 17 '16 at 00:28
  • I've added this as an answer. – Tim Kuehn May 17 '16 at 02:49

1 Answers1

4

Strip out some of the later statements and do a "RETURN identifier1, identifier2" etc. to see what the engine is doing.

Tim Kuehn
  • 3,201
  • 1
  • 17
  • 23