4 July 2014
4 July 2014,
 0

London, July 4th 2014

Orient Technologies released the new OrientDB-ETL component in beta version to easily pump data into OrientDB database without writing a line of code. So far the available extractors are:

  • CSV File
  • JDBC, namely any RDBMS on the market

 

How to import from Relational DBMS?

 

(1) Get the right JDBC driver

Most of DBMSs support JDBC driver. All you need is to gather the right DBMS’s JDBC driver and put it in the classpath or simply in the $ORIENTDB_HOME/lib directory.

(2) Write the ETL configuration

All yo need is to write a JSON file containing the ETL process. Create a new file dbms2orient.json somewhere. With the configuration below all the records from the table “Client” are imported in OrientDB from MySQL database. Start from this one.

{
  "config": {
    "verbose": true,
  },
  "extractor" : {
    "jdbc": { "driver": "com.mysql.jdbc.Driver", 
              "url": "jdbc:mysql://localhost/mysqlcrm", 
              "userName": "root", 
              "userPassword": "",
              "query": "select * from Client" }
  },
  "transformers" : [
    { "vertex": { "class": "Client"} }
  ],
  "loader" : {
    "orientdb": {
      "dbURL": "plocal:/temp/databases/orientdbcrm",
      "dbAutoCreate": true
    }
  }
}

(3) Start the ETL process

After installed the component execute the command:

$ oetl dbms2orient.json

 

That’s all. To improve ETL by using Transformers look at the documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>