Create relationship from CSV on existing nodes

A. To make this example to work, you need to remove the spaces from the .csv file.

B. (EDIT): I had a typo. I fixed the query and it now works.

I was problems getting this to work when the nodes are of different types:

owner.csv

id,name
1,Bob
id,petname
2,Rover
LOAD CSV WITH HEADERS FROM "file:///pet.csv" AS row
CREATE (:pet {id:row.id, petname:row.petname});
LOAD CSV WITH HEADERS FROM "file:///owner.csv" AS row
CREATE (:owner {id:row.id, name:row.name});

and using the same relationship file:

LOAD CSV WITH HEADERS FROM "file:///Relationships.csv" AS row
//look up the two nodes we want to connect up
MATCH (p1:owner {id:row.id_from}), (p2:pet {id:row.id_to})
//now create a relationship between them
CREATE (p1)-[:OWNS]->(p2);