从 RDBMS DB2 导入文档 DB OrientDB



在我的数据库中CU242176 DBMS OrientDB 版本 2.0.7 是一个表M_PERM:

PERM_DESC:string;
PERM_ID:integer not null;
PERM_NAME:string.

在我的数据库中CU242176 DBMS DB2 版本 9.1 是具有相同结构的表M_PERM。在此表中为 14 行。使用模块Orientdb-ETL,我确实导入了数据。没有错误,但表中没有数据。当表在PERM_ID上创建索引时。这是我的配置:

    {
  "config":{
    "log": "debug"
  },
  "extractor" : {
    "jdbc": 
    {  "driver": "com.ibm.db2.jcc.DB2Driver",
       "url": "jdbc:db2://ITS-C:50000/CU242176",
       "userName": "metr",
       "userPassword": "metr1",
       "query": "select PERM_DESC,PERM_ID,PERM_NAME from METR.M_PERM"
    }
  },
  "transformers":[
  ],
  "loader" : {
    "orientdb": {
      "dbURL": "plocal:c:/Program Files/orientdb-community-2.0.7/databases/CU242176",
      "dbUser": "admin",
      "dbPassword": "admin",
      "dbAutoCreate": false,
      "standardElementConstraints": false,
      "tx":true,
      "wal":false,
      "batchCommit":1000,
      "dbType": "document",
      "classes":[{"name": "M_PERM"}],
      "indexes": [{"class":"M_PERM", "fields":["PERM_ID:integer"], "type":"UNIQUE" }]
    }
  }
}

日志执行命令(oetl config_Import_M_PERM_JDBC.json):

OrientDB etl v.2.0.7 (build @BUILD@) www.orientechnologies.com
[orientdb] DEBUG Opening database 'plocal:c:/Program Files/orientdb-community-2.0.7/databases/
CU242176'...
2015-04-29 14:39:34:562 WARNING {db=CU242176} segment file 'database.ocf' was not closed corre
ctly last time [OSingleFileSegment]BEGIN ETL PROCESSOR
[orientdb] DEBUG orientdb: found 0 documents in class 'null'
END ETL PROCESSOR
extracted 29 records (0 records/sec) - 29 records -> loaded 14 documents (0 documents/sec) T otal time: 159ms [0 warnings, 0 errors]

如何解决此问题?对于加载到我的表中的 14 行。

而不是:

"classes": [{"name": "M_PERM"}],

用:

  "class": "M_PERM"

我在任何地方都看不到这个记录,但它对我有用。

最新更新