Search code examples
etlorientdb

Orientdb and teleporter issues


I am having difficulty doing a simple use case with Orientdb and teleporter

Stack:

OS: Windows 10 / Java: v8 / Orientdb: 2.2 beta2 / Teleporter: 1.0.0 / Database: MS SQL Express 2014

Setup:

  1. Installed, MS SQL Express 2014 with instance name SQL2014
  2. Created new db Graphdb with two tables, Country w/ PK Country ID and Province w/ PK Province ID and FK Country ID
  3. Installed, and start Orient db 2.2 beta 2
  4. Created new oteleporter_graphdb.bat

    oteleporter.bat -jdriver sqlserver -jurl jdbc:sqlserver://:54963;instance:SQL2014;databaseName:graphdb -juser sa -jpasswd -ourl plocal:$ORIENTDB_HOME/databases/graphdb -s naive -nr java -v 2

Test Case:

  1. Run oteleporter_graph.bat as-is

This test case read the db and created warnings for table’s part of sql metadata but Country & Province were not part of it.

  1. Modify oteleporter_graph.bat to include both Country and Province table

    oteleporter.bat -jdriver sqlserver -jurl jdbc:sqlserver://:54963;instance:SQL2014;databaseName:graphdb -juser sa -jpasswd -ourl plocal:$ORIENTDB_HOME/databases/graphdb -s naive -nr java -v 2 –include Country,Province

This test aborted!

  1. Modify oteleporter_graph.bat to include only Country table.

    oteleporter.bat -jdriver sqlserver -jurl jdbc:sqlserver://:54963;instance:SQL2014;databaseName:graphdb -juser sa -jpasswd -ourl plocal:$ORIENTDB_HOME/databases/graphdb -s naive -nr java -v 2 –include Country

This test case ran without any error but didn’t read any table from the database nor output anything out.

Questions:

  1. Am I missing any configuration steps?
  2. Test case #2, how to define multiple tables? Other questions:
  3. Possible to add filter to the tables?
  4. Instead of tables, views can be included? how would teleporter will identify the PKs / FKs?

Thanks in advance


Solution

  • I'll try to answer your questions in order.

    1. To install and run Teleporter you have to:
      • extract orientdb-teleporter-1.0.0.jar in your ORIENTDB_HOME/plugins path.
      • extract the oteleporter.bat and oteleporter.sh scripts in your ORIENTDB_HOME/bin path and launch them from that location with the expected arguments.
    2. You can define filters on multiple tables simply by using the syntax you used: -include <tableName1>,<tableName2>,...,<tableNameX> but if you are running Teleporter on Windows probably you need to add quotes to the last argument, so try with: –include "Country,Province"
    3. Filters are possible with a "table-granularity", so you can filter-in or filter-out entire tables but not elements contained in them (e.g. columns). In the next versions probably will be possible manage the schema filtering with a finer granularity.
    4. Teleporter includes only materialized views (persistent in your database) in the migration and in this first version identifies PKs and FKs starting from the metadata present in the schema of your database. Thus if you don't define a FK between two tables you won't have edges between the correspondent vertices. In the next version of Teleporter will be possible the relationships defining through an input JSON.

    If you have any doubt you can refer to official page, documentation and blog posts here:

    http://orientdb.com/orientdb-labs/teleporter/ (Official Teleporter Page)

    https://github.com/orientechnologies/orientdb-labs/blob/master/Teleporter-Index.md (Official Documentaion)

    http://orientdb.com/orientdb-teleporter-making-migrations-easier/ (Blog Post: OrientDB Teleporter - Making Migrations Easier (Part 1) )

    http://orientdb.com/orientdb-teleporter-making-migrations-easier-part-2/ (Blog Post: OrientDB Teleporter - Making Migrations Easier (Part 2) )