OrientDB ETL transformation to create edges

I am trying to extract data directly from Oracle to OrientDB using JDBC with ETL transformation. I have 2 tables alert and other is userRead table joined by a key column (alert_id). I am not successful in getting edges created though vertices, indexes are successfully created with data from source.

//alert:  {    "config": {      //  "log": "debug",      "parallel": true    },    "extractor" : {      "jdbc": { "driver": "oracle.jdbc.driver.OracleDriver",                "url": "jdbc:oracle:thin:@hostname:port/dbname",                "userName": "schema1",                "userPassword": "password",                "query": "select * from MC_ALERT$" }    },    "transformers" : [     { "vertex": { "class":"MC_ALERT"} }    ],  "loader": {      "orientdb": {        "dbURL": "plocal:/Users/dbadmin/workspace/orientdbEnprise2.1.8/databases/messaging",                 "dbType": "graph",        "dbUser": "admin",        "dbPassword": "admin",        "dbAutoCreate": true,        "batchCommit": 1000,            "indexes": [          {            "class": "MC_ALERT",            "fields": [ "alert_uuid:string" ],                "type": "UNIQUE"          }        ]      }    }  }        //userRead:    {    "config": {      "parallel": true    },    "extractor" : {     "jdbc": { "driver": "oracle.jdbc.driver.OracleDriver",                "url": "jdbc:oracle:thin:@hostname:port/dbname",                "userName": "schema1",                "userPassword": "password",                "query": "select a.* from MC_ALERT_USER_READ$ a, MC_ALERT$ b where a.alert_id = b.alert_uuid" }    },    "transformers" : [     { "vertex": { "class":"MC_ALERT_USER_READ"} },     { "edge": { "class": "HAS_ALERT_READ",                  "joinFieldName": "ALERT_ID",                  "lookup": "MC_ALERT.ALERT_UUID",                  "direction": "in"              }      }              ],  "loader": {      "orientdb": {        "dbURL": "plocal:/Users/dbadmin/workspace/orientdbEnprise2.1.8/databases/messaging",         "dbType": "graph",        "dbUser": "admin",        "dbPassword": "admin",        "dbAutoCreate": true,        "batchCommit": 1000,            "classes": [          {"name": "MC_ALERT","extends": "V"},          {"name": "MC_ALERT_USER_READ", "extends": "V"},          {"name": "HAS_ALERT_READ", "extends": "E"}        ],        "indexes": [          {            "class": "MC_ALERT_USER_READ",            "fields": [ "client_oid:string","user_oid:string","alert_id:string"],                  //"fields": [ "alert_id:string"],                "type": "UNIQUE"          }        ]      }    }  }

I need to create edges to establish relationship between alert and userRead through alert_id.


Pay attention to the field names in uppercase and lowercase.

I have tried with an example and it works.

OrientDB ETL transformation to create edges

Let me know.

Somehow OrientDB was thowing errors though memory was not an issue. After restarting orientDB it resolved JDBC issue. However I am not convinced with DB restart. Logs don't give much information.

Category: orientdb Time: 2016-01-26 Views: 0
Tags: orientdb

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.123 (s). 12 q(s)