简体   繁体   English

OrientDB ETL结果不在图形数据库中

[英]OrientDB ETL results not in graph Database

I have create this config file: 我已经创建了这个配置文件:

{ 
    "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"}]
             } } }

Class codeableConcept already exists with no records. class codeableConcept已经存在,没有任何记录。 The select table reads a small table with two rows: 选择表将读取一个包含两行的小表:

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 

I am changing the column names to match the following: 我正在更改列名称以匹配以下内容:

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;

Here is the end of the log: 这是日志的结尾:

[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]

It says it created codeableConcept RID #22:8, but it does not exist. 它说它创建了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

Any Ideas? 有任何想法吗?

I found the solution. 我找到了解决方案。 It took another set of eyes, but it was within the dbURL. 花费了另一双眼,但是它在dbURL中。

"dbURL": "plocal:localhost/p01/app/gdb/orientdb-community-2.2.17/databases/CorporateProviderData" “ dbURL”:“ plocal:localhost / p01 / app / gdb / orientdb-community-2.2.17 / databases / CorporateProviderData”

I didn't realize that it was creating a new database in another directory because of the use of "localhost". 我没有意识到由于使用“ localhost”,它正在另一个目录中创建新数据库。 Once I removed it, it worked. 一旦删除它,它就会起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM