Elasticsearch索引转储到Or​​ientDB

时间:2019-06-07 19:29:35

标签: elasticsearch etl orientdb

我正在尝试将我的elasticsearch索引放到东方。

我可以加载数据,但是,由于数据库无法正确生成,我不想在JSON中使用部分内容

ETL:

{
    "config" : {
        "log" : "debug",
        "parallel": false
    },
    "source" : {
        "file" : {"path" : "/test.json"}
    },
    "extractor" : {
        "json" : {}
    },
    "transformers" : [
        {"vertex" : {"class": "application"}}
    ],
    "loader" : {
        "orientdb" : {
            "dbURL" : "remote:localhost:/databases/esIndex",
            "dbUser" : "admin",
            "dbPassword" : "admin",
            "serverUser" : "admin",
            "serverPassword" : "admin",
            "standardElementConstraints" : true,
            "tx" : false,
            "wal" : false,
            "dbAutoDropIfExists": true,
            "dbAutoCreate": true,
            "dbAutoCreateProperties": true,
            "batchCommit" : 1000,
            "dbType" : "document",
            "classes" : [
                {"name" : "application", "extends" : "V"}
            ]
        }
    }
}

JSON结构:(我有一个数组列表)

{
    "_index": "index",
    "_type": "release001",
    "_id": "",
    "_score": 1,
    "_source": {
      "documentName": "data",
      "sourceFileLocation": "data"
    }
  }

我只希望东方的源内部元素。目前,我正在获取索引类型ID等作为属性。然后source属性只是其中的json字符串,我绝对不希望。

我的最终模式应为documentName和sourceFileLocation作为属性

0 个答案:

没有答案