多图的数据加载问题
配置了两个图如何区分它的schema 我是将其命名为 scheam和schema1 在加载到对应图上去命令为 bin/sdcgraph-loader -g hugegraph -f data/struct.json -s data/schema.groovy bin/sdcgraph-loader -g hugegraph1 -f data1/struct1.json -s data1/schema1.groovy 这样他会覆盖掉 没有达到两个数据模型的目的 麻烦各位了
@AmbitiousHERO 你是说这样写两个schema文件的内容都覆盖到hugegraph这一个图里面了吗?看下schema.groovy和schema1.groovy文件的内容。
scheam的内容: schema.propertyKey("idcard").asText().ifNotExist().create(); schema.propertyKey("age").asInt().ifNotExist().create(); schema.propertyKey("name").asText().ifNotExist().create(); schema.propertyKey("gender").asText().ifNotExist().create(); schema.propertyKey("place").asText().ifNotExist().create(); schema.propertyKey("方式").asText().ifNotExist().create(); schema.propertyKey("班次").asText().ifNotExist().create(); schema.propertyKey("时间").asText().ifNotExist().create(); schema.edgeLabel("父亲").sourceLabel("people").targetLabel("people").properties().ifNotExist().create(); schema.edgeLabel("母亲").sourceLabel("people").targetLabel("people").properties().ifNotExist().create(); schema.edgeLabel("儿子").sourceLabel("people").targetLabel("people").properties().ifNotExist().create(); schema.edgeLabel("女儿").sourceLabel("people").targetLabel("people").properties().ifNotExist().create(); schema.edgeLabel("朋友").sourceLabel("people").targetLabel("people").properties().ifNotExist().create(); schema.edgeLabel("同事").sourceLabel("people").targetLabel("people").properties().ifNotExist().create(); schema.edgeLabel("弟弟").sourceLabel("people").targetLabel("people").properties().ifNotExist().create(); schema.edgeLabel("夫妻").sourceLabel("people").targetLabel("people").properties().ifNotExist().create(); schema.edgeLabel("亲戚").sourceLabel("people").targetLabel("people").properties().ifNotExist().create();
schema1的内容: schema.propertyKey("normal_name").asText().ifNotExist().create(); schema.propertyKey("infect_name").asText().ifNotExist().create(); schema.propertyKey("second_name").asText().ifNotExist().create(); schema.propertyKey("age").asInt().ifNotExist().create(); schema.propertyKey("gender").asText().ifNotExist().create(); schema.propertyKey("time").asText().ifNotExist().create(); schema.propertyKey("train_name").asText().ifNotExist().create(); schema.propertyKey("place_name").asText().ifNotExist().create(); schema.propertyKey("address").asText().ifNotExist().create(); schema.propertyKey("arrive_time").asText().ifNotExist().create(); schema.propertyKey("leave_time").asText().ifNotExist().create(); schema.edgeLabel("家属").sourceLabel("normal_person").targetLabel("second_person").properties("关系").ifNotExist().create(); schema.edgeLabel("儿子").sourceLabel("normal_person").targetLabel("normal_person").properties().ifNotExist().create(); schema.edgeLabel("妻子").sourceLabel("normal_person").targetLabel("normal_person").properties().ifNotExist().create(); schema.edgeLabel("同事").sourceLabel("normal_person").targetLabel("normal_person").properties().ifNotExist().create(); schema.edgeLabel("客户").sourceLabel("normal_person").targetLabel("normal_person").properties().ifNotExist().create(); schema.edgeLabel("丈夫").sourceLabel("normal_person").targetLabel("infect_person").properties().ifNotExist().create(); schema.edgeLabel("亲戚").sourceLabel("normal_person").targetLabel("normal_person").properties().ifNotExist().create();
您说是不是两个schema中有相同的属性或者边导致了它的覆盖呢? 在我导入schema正常 然后导入schema1的就会出现不会显示边出来 但是我先导入schema1它也会正常 在导入schema就会少边
@AmbitiousHERO hugegraph和hugegraph1两个图的内容隔离的,应该不会相互影响,是否操作的时候把数据导入到同一个图了?
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label