在我的数据库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行。
答案 0 :(得分:0)
而不是:
"classes": [{"name": "M_PERM"}],
使用:
"class": "M_PERM"
我无法在任何地方看到这一点,但它对我有用。