关于建模关系的问题。
发布于 7 年前 作者 zhangdeshuai409930360 2030 次浏览 来自 问答

例如 下面是节点csv数据 1,1,app_001 2,2,app_001 2,2,app_001 3,3,app_001 3,3,app_001 4,4,app_001 下面是关系csv 1,2,myl,产品转发22,微信,2018-3-1 18:00:00,2018-3-1 18:00:00 2,3,myl,产品转发22,微信,2018-3-1 18:00:00,2018-3-1 18:00:00 3,4,myl,产品转发22,微信,2018-3-1 18:00:00,2018-3-1 18:00:00 4,3,myl,产品转发22,微信,2018-3-1 18:00:00,2018-3-1 18:00:00 4,2,myl,产品转发22,微信,2018-3-1 18:00:00,2018-3-1 18:00:00 3,1,myl,产品转发22,微信,2018-3-1 18:00:00,2018-3-1 18:00:00

load语句为: LOAD CSV WITH HEADERS FROM “file:/home/20180402.csv” AS row With row merge (m:User {open_id: row.open_id, name: row.name,company_id:row.company_id});

LOAD CSV WITH HEADERS FROM “file:/home/20180402-ship.csv” as line match (a:User{open_id:line.from_id}) match (b:User{open_id:line.to_id}) merge (a)-[r:ship{card_id:line.card_id,source:line.source,trance_type:line.trance_type,open_time:line.open_time,transpond_time:line.transpond_time}]->(b);

建立模型之后 会出现3到4,4到3的双向关系,怎么才能得到单向关系呢? TIM截图20180408201323.png

1 回复

3,4,myl,产品转发22,微信,2018-3-1 18:00:00,2018-3-1 18:00:00 4,3,myl,产品转发22,微信,2018-3-1 18:00:00,2018-3-1 18:00:00 只保留一条就可以得到单向关系

回到顶部