Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-18-2019 09:06 AM
Hi, while I am running the following multi merge, multi create query:
USING PERIODIC COMMIT 10000
LOAD CSV WITH HEADERS FROM "file:///Transactions_with_risk_scores.csv" AS line
WITH line, SPLIT(line.VALUE_DATE, "/") AS date
WHERE line.TRANSACTION_ID IS NOT NULL AND line.VALUE_DATE IS NOT NULL
MATCH (transaction:Transaction),(cust:Customer)
// Match Customer and Transaction nodesMERGE (orig: Originator { name: line.F50_ORIGINATOR} ) SET
orig.ctry_code = line.F50_ORIGINATOR_CTRY_CODE,
orig.offshore_flag = line.F50_ORIGINATOR_OFFS_FLAGMERGE (benf: Beneficiary {name : line.F59_BENEFICIARY } ) SET
benf.ctry_code = line.F59_BENEFICIARY_CTRY_CODE,
benf.offshore_flag = line.F59_BENEFICIARY_OFFS_FLAGMERGE (ord_bank : Ordering_Bank {name: line.F52_ORDERING_BANK }) SET
ord_bank.ctry_code = line.F52_ORDERING_BANK_CTRY_CODE,
ord_bank.offshore_flag = line.F52_ORDERING_BANK_OFFS_FLAGCREATE (transaction)-[:AGAINST]->(cust)
CREATE (orig)-[:MEDIATED_ON]-> (ord_bank)
CREATE (ord_bank) -[:MEDIATED_TO]->(benf)
CREATE (transaction) -[:INITIATED_BY]->(orig)
CREATE (transaction) -[:FINISHED_AT]->(orig)
CREATE (transaction) -[:MEDIATED_BY]->(ord_bank)MERGE (source_code : Source_system_code { code: line.SOURCE_SYSTEM_CODE})
MERGE (source_subcode : Source_system_subcode { code: line.SOURCE_SYSTEM_SUB_CODE})CREATE (transaction) -[:OF_CATEGORY]-> (source_code)
CREATE (transaction) -[:OF_SUBCATEGORY]-> (source_subcode)
CREATE (source_subcode) <-[:SUBCODE_OF]- (source_code)
I get the following error logs and the transaction is unable to rollback:
2019-01-18 15:52:04.467+0000 WARN The client is unauthorized due to authentication failure.
2019-01-18 16:36:46.888+0000 ERROR Client triggered an unexpected error [Neo.DatabaseError.General.UnknownError]: Unable to rollback transaction, reference 840fff14-66e7-40ac-9ae8-bbb96cbb5870.
It is weird because it happened first while running in Chrome browser, was assuming it is related to external connection issues. Currently, the issue pops up in Neo4j Browser. Using neo4j 3.5.1 on desktop 1.1.13 on Windows. Thanks in advance! Immediately, I ran a more simpler query and this works:
LOAD CSV WITH HEADERS FROM "file:///Customer_profiles_March_July.csv" AS line2
MATCH (cust:Customer) where cust.id = toInteger(line2.ENTITY_SOURCE_REFERENCE_ID)
SET cust.monthly_frequency= toInteger(line2.monthly_freq),
cust.average_original_amount= toInteger(line2.avg_orig_amount),
cust.average_base_amount= toInteger(line2.avg_base_amount),
cust.stdev_original_amount= toInteger(line2.sd_orig_amount),
cust.stdev_base_amount= toInteger(line2.sd_base_amount),
cust.max_transac_made_in_1day = toInteger(line2.max_transac_in_one_day)
Solved! Go to Solution.
01-18-2019 01:30 PM
Hi,
MATCH (transaction:Transaction),(cust:Customer)
This selects all nodes with labels 'Transaction', and 'Customer'.
Here you have to select a 'Transaction' node with id=line.TRANSACTION_ID and a 'Customer' with id=xxx (like in the second query)
After your MATCH statement use
WITH line, transaction, cust
Try this.
-Kamal
01-18-2019 01:30 PM
Hi,
MATCH (transaction:Transaction),(cust:Customer)
This selects all nodes with labels 'Transaction', and 'Customer'.
Here you have to select a 'Transaction' node with id=line.TRANSACTION_ID and a 'Customer' with id=xxx (like in the second query)
After your MATCH statement use
WITH line, transaction, cust
Try this.
-Kamal
All the sessions of the conference are now available online