Hi all,
I'm trying to use LOAD CSV via node-neo4j, doing something like this:
var query = "USING PERIODIC COMMIT 1000 LOAD CSV FROM 'file:\Users\applications\neo\csv.dat' AS line ";
query += "MATCH (s:schema {name:'Unit'}) ";
query += "MERGE (u:unit {id:line[0], tag:line[1], name:line[2], type:line[3]} ) ";
query += "MERGE (u)-[:schema]-(s) RETURN
u.id";
var params = {};
neodb.query(query, params, function(err,qres) {
if( err ){ return qdfr.reject(err); }
else {
qdfr.resolve('ok');
}
});
I can cut and paste the query into neo4j-shell and it runs, but when I run it via my node utility, I get:
query failed Error: Parameters must be a JSON map
Any idea why this breaks?
Thanks!
Matt Hodges