waynecookie opened a new issue, #315: URL: https://github.com/apache/incubator-hugegraph-toolchain/issues/315
### Problem Type (问题类型) _No response_ ### Before submit - [X] I had searched in the [issues](https://github.com/hugegraph/hugegraph-loader/issues) and found no similar issues. ### Environment (环境信息) - Server Version: v0.12.x - Loader Version: v0.12.x - Data Size: xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) --> ### Your Question (问题描述) 通过配置json(修改mysql的样例), 然后使用 sh bin/hugegraph-loader.sh -g hugegraph -f example/oracle/struct.json -s example/oracle/schema.groovy -h IP -p PORT 1、url 为 jdbc:oracle:thin:@10.254.21.6:1521 1.1、配置了“database” >> HugeGraphLoader worked in NORMAL MODE vertices/edges loaded this time : Failed to load, cause: Failed to connect database via 'jdbc:oracle:thin:@10.254.21.6:1521' 1.2、没有配置了“database” Failed to start loading, cause: Invalid mapping file 'example/oracle/struct.json' 2、url 为 jdbc:oracle:thin:@10.254.21.6:1521:helowin >> HugeGraphLoader worked in NORMAL MODE vertices/edges loaded this time : Failed to load, cause: Failed to connect database via 'jdbc:oracle:thin:@10.254.21.6:1521:helowin‘ 如图的数据库配置  请问,"database" 填什么? ### Vertex/Edge example (问题点 / 边数据举例) ```javascript { "vertices": [ { "label": "person", "input": { "type": "jdbc", "vendor": "ORACLE", "driver": "oracle.jdbc.driver.OracleDriver", "url": "jdbc:oracle:thin:@IP:PORT", "database": "helowin", "table": "PERSON", "username": "QWE", "password": "66666", "batch_size": 500 }, "id": "id", "null_values": [ "NULL" ] }, { "label": "software", "input": { "type": "jdbc", "vendor": "ORACLE", "driver": "oracle.jdbc.driver.OracleDriver", "url": "jdbc:oracle:thin:@IP:PORT", "database": "helowin", "table": "SOFTWARE", "username": "QWE", "password": "66666", "batch_size": 500 }, "id": "id" } ], "edges": [ { "label": "knows", "source": [ "source_id" ], "target": [ "target_id" ], "input": { "type": "jdbc", "vendor": "ORACLE", "driver": "oracle.jdbc.driver.OracleDriver", "url": "jdbc:oracle:thin:@IP:PORT", "database": "helowin", "table": "KNOWS", "username": "QWE", "password": "66666", "batch_size": 500 }, "ignored": [ "id" ] }, { "label": "created", "source": [ "source_id" ], "target": [ "target_id" ], "input": { "type": "jdbc", "vendor": "ORACLE", "driver": "oracle.jdbc.driver.OracleDriver", "url": "jdbc:oracle:thin:@IP:PORT", "database": "helowin", "table": "CREATED", "username": "QWE", "password": "66666", "batch_size": 500 }, "ignored": [ "id" ] } ] } ``` ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构) ```javascript // Define schema schema.propertyKey("name").asText().ifNotExist().create(); schema.propertyKey("age").asInt().ifNotExist().create(); schema.propertyKey("city").asText().ifNotExist().create(); schema.propertyKey("weight").asDouble().ifNotExist().create(); schema.propertyKey("lang").asText().ifNotExist().create(); schema.propertyKey("date").asText().ifNotExist().create(); schema.propertyKey("price").asDouble().ifNotExist().create(); schema.vertexLabel("person") .properties("name", "age", "city") .primaryKeys("name") .nullableKeys("age", "city") .ifNotExist() .create(); schema.vertexLabel("software") .useCustomizeNumberId() .properties("name", "lang", "price") .ifNotExist() .create(); schema.indexLabel("personByAge") .onV("person") .by("age") .range() .ifNotExist() .create(); schema.indexLabel("personByCity") .onV("person") .by("city") .secondary() .ifNotExist() .create(); schema.indexLabel("personByAgeAndCity") .onV("person") .by("age", "city") .secondary() .ifNotExist() .create(); schema.indexLabel("softwareByPrice") .onV("software") .by("price") .range() .ifNotExist() .create(); schema.edgeLabel("knows") .sourceLabel("person") .targetLabel("person") .properties("date", "weight") .ifNotExist() .create(); schema.edgeLabel("created") .sourceLabel("person") .targetLabel("software") .properties("date", "weight") .ifNotExist() .create(); schema.indexLabel("createdByDate") .onE("created") .by("date") .secondary() .ifNotExist() .create(); schema.indexLabel("createdByWeight") .onE("created") .by("weight") .range() .ifNotExist() .create(); schema.indexLabel("knowsByWeight") .onE("knows") .by("weight") .range() .ifNotExist() .create(); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
