cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Need help with correct queries

I need replacement of following queries:

Execute the following query to run the PageRank algorith on the placeholder enteties:

CALL algo.pageRank('Placeholder', 'Payes', {writeProperty: 'pagerank'})

Run this for community mining through label propagation:

CALL algo.labelPropagation('Placeholder', 'Payes', 'OUTGOING',
 {write:true, partitionProperty: "community", weightProperty: "count"})

I have followed this till now:

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:///bs140513_032310.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


MERGE (customer:Customer {id: customerID[1], age: customerAge[1], gender: customerGender[1], zipCode: customerZip[1]})

MERGE (bank:Bank {id: merchantID[1], zipCode: merchantZip[1]})

CREATE (transaction:Transaction {amount: line.amount, fraud: line.fraud, category: transCategory[1], step: line.step})-[:WITH]->(bank)
CREATE (customer)-[:MAKE]->(transaction)
;
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, 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)
1 REPLY 1

Hello; I am using same dataset. I have error while I using CALL algo.pageRank('Placeholder', 'PAYS', {writeProperty: 'pagerank'}). I guess algo.pageRank didn't use anymore for last version of neo4j. Did you find dataset with correct queries?