我已经创建了这个配置文件:
{
"config": { "log": "debug" },
"extractor": {
"jdbc": {
"driver":"com.ibm.db2.jcc.DB2Driver",
"url":"jdbc:db2://DB2TVIPA:447/DB2TVIPA",
"userName": "lidt9bl",
"userPassword": "Wam52017",
"query": "select * from DB2TST5.COMVTC" } },
"transformers": [
{log: {prefix: "MySQL -> "}},
{"field": {"fieldName":"text", "value": "Medical Vendor Type Code"} },
{"field": {"fieldName":"code","expression": "COMVTC_C"} },
{"field": {"fieldName":"COMVTC_C", "operation" :"remove"} },
{"field": {"fieldName":"display", "expression" : "COMVTC_NM"} },
{"field": {"fieldName":"COMVTC_NM", "operation" : "remove"} },
{"field": {"fieldName":"status", "expression" :"COMVTC_STUS_C"} },
{"field": {"fieldName":"COMVTC_STUS_C", "operation" :"remove"} },
{"field": {"fieldName":"effectiveDate","expression" : "COMVTC_EFF_DT"} },
{"field": {"fieldName":"COMVTC_EFF_DT","operation" : "remove"} },
{"field": {"fieldName":"terminationDate", "expression" : "COMVTC_TRM_DT"} },
{"field": {"fieldName":"COMVTC_TRM_DT", "operation" : "remove"} },
{"field": {"fieldName":"createTS","expression" : "COMVTC_REC_MTN_TS"} },
{"field": {"fieldName":"COMVTC_REC_MTN_TS", "operation" : "remove"} },
{"field": {"fieldName":"userID", "expression" : "COMVTC_REC_MTN_ID"} },
{"field": {"fieldName":"COMVTC_REC_MTN_ID", "operation" : "remove"} },
{"field": {"fieldName":"system", "value": "1"} },
{"field": {"fieldName":"version", "value": "1"} },
{"field": {"fieldName":"userSelected", "value": false} },
{"vertex":{"class": "codeableConcept"} } ],
"loader": {
"orientdb": {
"dbURL": "plocal:localhost/p01/app/gdb/orientdb-community-2.2.17/databases/CorporateProviderData",
"dbUser": "admin",
"dbPassword": "admin",
"dbAutoDropIfExists": false,
"dbAutoCreate": false,
"tx": false,
"wal": true,
"batchCommit": 2,
"dbType": "graph",
"dbAutoCreateProperties": true,
"classes":[{"name":"codeableConcept", "extends": "coding"},{"name":"coding", "extends": "V"}]
} } }
类 codeableConcept 已经存在但没有记录。选择表读取一个有两行的小表:
COMVTC_C COMVTC_STUS_C COMVTC_EFF_DT COMVTC_TRM_DT COMVTC_NM COMVTC_REC_MTN_TS COMVTC_REC_MTN_ID
-------- ------------- ------------- ------------- -------------------------------------------------- -------------------------- -----------------
AS A 1937-01-01 NULL Administrative Service 2007-01-15 02:06:29.396586 XXXXXX
MS A 1937-01-01 NULL Medical Service 2007-01-15 02:06:29.416709 XXXXXX
我正在更改列名以匹配以下内容:
create class coding extends V;
create property coding.system string;
create property coding.version string;
create property coding.code string;
create property coding.display string;
create property coding.userSelected Boolean;
ALTER PROPERTY coding.system MANDATORY true;
ALTER PROPERTY coding.version MANDATORY true;
ALTER PROPERTY coding.code MANDATORY true;
CREATE INDEX Index_CodeSet_key ON coding (system,version,code) UNIQUE;
create class codeableConcept extends coding;
create property codeableConcept.text string;
这是日志的结尾:
[3:field] DEBUG Transformer output: {COMVTC_C:null,COMVTC_STUS_C:null,COMVTC_EFF_DT:null,COMVTC_TRM_DT:null,COMVTC_NM:null,COMVTC_REC_MTN_TS:null,COMVTC_REC_MTN_ID:null,text:Medical Vendor Type Code,code:MS,display:Medical Service ,status:A,effectiveDate:1937-01-01,terminationDate:null,createTS:2007-01-15 02:06:29.416709,userID:APOLIDB ,system:1,version:1,userSelected:false}
[3:vertex] DEBUG Transformer input: {COMVTC_C:null,COMVTC_STUS_C:null,COMVTC_EFF_DT:null,COMVTC_TRM_DT:null,COMVTC_NM:null,COMVTC_REC_MTN_TS:null,COMVTC_REC_MTN_ID:null,text:Medical Vendor Type Code,code:MS,display:Medical Service ,status:A,effectiveDate:1937-01-01,terminationDate:null,createTS:2007-01-15 02:06:29.416709,userID:APOLIDB ,system:1,version:1,userSelected:false}
[3:vertex] DEBUG Transformer output: v(codeableConcept)[#22:8]
[orientdb] INFO committing
Pipeline worker done without errors:: true
all items extracted
END ETL PROCESSOR
+ extracted 5 records (0 records/sec) - 5 records -> loaded 2 vertices (0 vertices/sec) Total time: 195ms [0 warnings, 0 errors]
它说它创建了 codeableConcept RID #22:8,但它不存在。
orientdb {db=CorporateProviderData}> info class codeableConcept
CLASS 'codeableConcept'
Records..............: 0
Super classes........: [coding]
Default cluster......: codeableconcept (id=25)
Supported clusters...: codeableconcept(25), codeableconcept_1(26), codeableconcept_2(27), codeableconcept_3(28)
Cluster selection....: round-robin
Oversize.............: 0.0
有任何想法吗?