OrientDB仅使用ETL工具导入边

OrientDB仅使用ETL工具导入边,etl,orientdb,orientdb-2.1,orientdb-etl,Etl,Orientdb,Orientdb 2.1,Orientdb Etl,我已经使用OETL将所有顶点插入到图形中 现在,我有一个文件,它以以下方式勾勒出边缘: 节点1,相关类型,节点2 11000001,关系_A,10208879 11000001,关系_A,10198662 11000001,关系,10159927 11000001,关系科,10165779 如何使用OrientDB OETL工具导入它 我尝试了以下方法: "transformers": [ { "csv": {} }, { "command" : { "c

我已经使用OETL将所有顶点插入到图形中

现在,我有一个文件,它以以下方式勾勒出边缘:

节点1,相关类型,节点2
11000001,关系_A,10208879
11000001,关系_A,10198662
11000001,关系,10159927
11000001,关系科,10165779

如何使用OrientDB OETL工具导入它

我尝试了以下方法:

"transformers": [
    { "csv": {} },
    { "command" : {
            "command" : "create edge ${rel_type} from (select flatten(@rid) from V where node_id= ${node_1}) to (select flatten(@rid) from V where node_id = ${node_2})",
            "output" : "edge"
        }
    }
  ],

但由于无法解析csv中的值,因此此操作失败。

必须使用$input变量

"transformers": [{
        "csv": {
            "separator": ","
        }
    },
    {
    "command" : {
            "command" : "create edge ${input.rel_type} from (select from V where node_id= ${input.node_1}) to (select from V where node_id = ${input.node_2})",
            "output" : "edge"
        }
    }
  ],
它对我有用


希望有帮助。

您是如何导入所有顶点的?是否使用orientdb文档中的普通导入工具?因为我现在面临着同样的问题