使用apoc.periodic.iterate 报错
发布于 7 年前 作者 a835180269 3574 次浏览 来自 问答

语句如下 CALL apoc.periodic.iterate(‘call apoc.load.jdbc(“myhive”,“select f_op_site,customer as cust_code,opsite_cust_cnt,opsite_cust_il,f_op_user_cnt,f_op_branch_cnt,f_channel_cnt,dt from rel_i_l0106002_opsite_cust where dt = 20170131 and f_op_site is not null and customer is not null and length(f_op_site) != 0 and length(customer) != 0 limit 99999999”) yield row return row as value’,‘MATCH (a:opsiteInfo),(b:custInfo) WHERE a.f_op_site = value.f_op_site AND b.cust_code = value.cust_code MERGE (a)-[r:L0106002{month:toInt(value.dt)/100}]->(b) on CREATE SET r += value,r.month = toInt(value.dt)/100 on MATCH SET r += value,r.month = toInt(value.dt)/100’, {batchSize:5000, parallel:true, iterateList:true})

执行2-3个批次就出会错

2018-04-25 09:52:56.583+0000 INFO starting batching from call apoc.load.jdbc("myhive","select f_op_site,customer as cust_code,opsite_cust_cnt,opsite_cust_il,f_op_user_cnt,f_op_branch_cnt,f_channel_cnt,dt from rel_i_l0106002_opsite_cust where dt = 20170131 and f_op_site is not null and customer is not null and length(f_op_site) != 0 and length(customer) != 0 limit 99999999") yield row return row as value operation using iteration MATCH (a:opsiteInfo),(b:custInfo) WHERE a.f_op_site = value.f_op_site AND b.cust_code = value.cust_code MERGE (a)-[r:L0106002{month:toInt(value.dt)/100}]->(b) on CREATE SET r += value,r.month = toInt(value.dt)/100 on MATCH SET r += value,r.month = toInt(value.dt)/100 in separate thread 2018-04-25 09:53:48.832+0000 WARN Error during iterate.commit: 2018-04-25 09:53:48.833+0000 WARN 560 times: java.lang.NullPointerException

日志如上,这是为什么报错,求大神解答一下…

2 回复

请问解决了吗?出现了同样的错误!

麻烦问下,你是怎么连接hive的?

回到顶部