LOAD CSV WITH HEADERS FROM
'Graph-ML-Fraud-Detection/bs140513_032310.csv at master · aravind-sundaresan/Graph-ML-Fraud-Detection · GitHub' AS line
WITH line,
SPLIT(line.customer, "'") AS customerID,
SPLIT(line.merchant, "'") AS merchantID,
SPLIT(line.age, "'") AS customerAge,
SPLIT(line.gender, "'") AS customerGender,
SPLIT(line.zipcodeOri, "'") AS customerZip,
SPLIT(line.zipMerchant, "'") AS merchantZip,
SPLIT(line.category, "'") AS transCategory
I am getting this error:
Query cannot conclude with WITH (must be RETURN or an update clause) (line 3, column 1 (offset: 137))
"WITH line,"
What is wrong with it?
I need to load above csv and then split it and then change the column names
LOAD CSV WITH HEADERS FROM 'https://github.com/aravind-sundaresan/Graph-ML-Fraud-Detection/blob/master/data/bs140513_032310.csv' AS line
CREATE (:Customer {
name: line.customer,
name: line.merchant,
name: line.age,
name: line.gender,
name: line.zipcodeOri,
name: line.zipMerchant,
name: line.category
})
RETURN line.customer AS customerID, line.merchant AS merchantID, line.age AS customerAge, line.gender AS customerGender, line.zipcodeOri AS customerZip, line.zipMerchant AS merchantZip, line.category AS transCategory
I keep getting following error: There is no procedure with the name algo.pageRank registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.
These are the queries I ran prior to this:
CREATE CONSTRAINT ON (c:Customer) ASSERT c.id IS UNIQUE; CREATE CONSTRAINT ON (b:Bank) ASSERT b.id IS UNIQUE;
USING PERIODIC COMMIT LOAD CSV WITH HEADERS FROM 'file:///data.csv' AS line WITH line, SPLIT(line.customer, "'") AS customerID, SPLIT(line.merchant, "'") AS merchantID, SPLIT(line.age, "'") AS customerAge, SPLIT(line.gender, "'") AS customerGender, SPLIT(line.zipcodeOri, "'") AS customerZip, SPLIT(line.zipMerchant, "'") AS merchantZip, SPLIT(line.category, "'") AS transCategory
MATCH (c1:Customer)-[:MAKE]->(t1:Transaction)-[:WITH]->(b1:Bank) WITH c1, b1 MERGE (p1:Placeholder {id: b1.id})
MATCH (c1:Customer)-[:MAKE]->(t1:Transaction)-[:WITH]->(b1:Bank) WITH c1, b1 MERGE (p1:Placeholder {id: c1.id})
MATCH (c1:Customer)-[:MAKE]->(t1:Transaction)-[:WITH]->(b1:Bank) WITH c1, b1, count(*) as cnt MATCH (p1:Placeholder {id:c1.id}) WITH c1, b1, p1, cnt MATCH (p2:Placeholder {id: b1.id}) WITH c1, b1, p1, p2, cnt CREATE (p1)-[:Payes {cnt: cnt}]->(p2)