2016-06-14 74 views
0

我試圖運行下面的查詢來創建我從.csv文件節點和關係,我有:「無法回滾事務」錯誤的Neo4j

USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM 'file:///LoanStats3bEDITED.csv' AS line 
//USING PERIODIC COMMIT 1000 makes sure we don't get a memory error 
//creating the nodes with their properties 
//member node 
CREATE (member:Person{member_id:TOINT(line.member_id)}) 
//Personal information node 
CREATE (personalInformation:PersonalInformation{addr_state:line.addr_state}) 
//recordHistory node 
CREATE (recordHistory:RecordHistory{delinq_2yrs:TOFLOAT(line.delinq_2yrs),earliest_cr_line:line.earliest_cr_line,inq_last_6mths:TOFLOAT(line.inq_last_6mths),collections_12_mths_ex_med:TOFLOAT(line.collections_12_mths_ex_med),delinq_amnt:TOFLOAT(line.delinq_amnt),percent_bc_gt_75:TOFLOAT(line.percent_bc_gt_75), pub_rec_bankruptcies:TOFLOAT(line.pub_rec_bankruptcies), tax_liens:TOFLOAT(line.tax_liens)}) 
//Loan node 
CREATE (loan:Loan{funded_amnt:TOFLOAT(line.funded_amnt),term:line.term, int_rate:line.int_rate, installment:TOFLOAT(line.installment),purpose:line.purpose}) 
//Customer Finances node 
CREATE (customerFinances:CustomerFinances{emp_length:line.emp_length,verification_status_joint:line.verification_status_joint,home_ownership:line.home_ownership, annual_inc:TOFLOAT(line.annual_inc), verification_status:line.verification_status,dti:TOFLOAT(line.dti), annual_inc_joint:TOFLOAT(line.annual_inc_joint),dti_joint:TOFLOAT(line.dti_joint)}) 
//Accounts node 
CREATE (accounts:Accounts{revol_util:line.revol_util,tot_cur_bal:TOFLOAT(line.tot_cur_bal)}) 

//creating the relationships 
CREATE UNIQUE (member)-[:FINANCIAL{issue_d:line.issue_d,loan_status:line.loan_status, application_type:line.application_type}]->(loan) 
CREATE UNIQUE (customerFinances)<-[:FINANCIAL]-(member) 
CREATE UNIQUE (accounts)<-[:FINANCIAL{open_acc:TOINT(line.open_acc),total_acc:TOFLOAT(line.total_acc)}]-(member) 
CREATE UNIQUE (personalInformation)<-[:PERSONAL]-(member) 
CREATE UNIQUE (recordHistory)<-[:HISTORY]-(member) 

不過,我不斷收到以下錯誤:

Unable to rollback transaction 

這是什麼意思,我該如何解決我的查詢,以便它可以成功運行?

我現在收到以下錯誤:

GC overhead limit exceeded 

回答

0

我想你是內存不足。 解決方案:

使用的Neo4j-import.batch

分割你的querys。

制約約束來加速查詢。

爲什麼你需要創造獨特?如果您的csv乾淨,或者使用合併,您可以使用create。

我認爲如果您不是在瀏覽器中而是在shell中執行查詢,速度也會更快。

下載更多內存:-)

+0

擺脫關係創造中的「獨特」幫助! – Aly

+0

很高興幫助。我不相信「創造獨特」。 – Mvde