mkj-git opened a new issue, #658:
URL: https://github.com/apache/incubator-hugegraph-toolchain/issues/658

   ### Problem Type (问题类型)
   
   None
   
   ### Before submit
   
   - [x] I had searched in the 
[issues](https://github.com/apache/hugegraph-toolchain/issues) and found no 
similar issues.
   
   ### Environment (环境信息)
   
   - Server Version: Latest build from source
   - Toolchain Version: Latest build from source
   - Data Size:  Just few
   
   
   ### Your Question (问题描述)
   
   In the following v2 mapping json file, how can I declare vertices & edges 
both in the same structs id:1 ? Right now either `vertices` or `edges` is there 
at a time **but not both**.
   
   ```
   {
     "version": "2.0",
     "structs": [
       {
         "id": "1",
         "skip": false,
         "input": {
           "type": "FILE",
           "path": "${store_path}/vertex_person.csv",
           "file_filter": {
             "extensions": [
               "*"
             ]
           },
           "format": "CSV",
           "delimiter": ",",
           "date_format": "yyyy-MM-dd HH:mm:ss",
           "time_zone": "GMT+8",
           "skipped_line": {
             "regex": "(^#|^//).*|"
           },
           "compression": "NONE",
           "header": [
             "name",
             "age",
             "city"
           ],
           "charset": "UTF-8",
           "list_format": {
             "start_symbol": "[",
             "elem_delimiter": "|",
             "end_symbol": "]"
           }
         },
         "vertices": [
           {
             "label": "person",
             "skip": false,
             "id": null,
             "unfold": false,
             "field_mapping": {},
             "value_mapping": {},
             "selected": [],
             "ignored": [],
             "null_values": [
               ""
             ],
             "update_strategies": {}
           }
         ],
         "edges": []
       },
       {
         "id": "2",
         "skip": false,
         "input": {
           "type": "FILE",
           "path": "${store_path}/vertex_software.csv",
           "file_filter": {
             "extensions": [
               "*"
             ]
           },
           "format": "CSV",
           "delimiter": ",",
           "date_format": "yyyy-MM-dd HH:mm:ss",
           "time_zone": "GMT+8",
           "skipped_line": {
             "regex": "(^#|^//).*|"
           },
           "compression": "NONE",
           "header": null,
           "charset": "UTF-8",
           "list_format": {
             "start_symbol": "",
             "elem_delimiter": "|",
             "end_symbol": ""
           }
         },
         "vertices": [
           {
             "label": "software",
             "skip": false,
             "id": null,
             "unfold": false,
             "field_mapping": {},
             "value_mapping": {},
             "selected": [],
             "ignored": [],
             "null_values": [
               ""
             ],
             "update_strategies": {}
           }
         ],
         "edges": []
       },
       {
         "id": "3",
         "skip": false,
         "input": {
           "type": "FILE",
           "path": "${store_path}/edge_knows.csv",
           "file_filter": {
             "extensions": [
               "*"
             ]
           },
           "format": "CSV",
           "delimiter": null,
           "date_format": "yyyy-MM-dd HH:mm:ss",
           "time_zone": "GMT+8",
           "skipped_line": {
             "regex": "(^#|^//).*|"
           },
           "compression": "NONE",
           "header": null,
           "charset": "UTF-8",
           "list_format": null
         },
         "vertices": [],
         "edges": [
           {
             "label": "knows",
             "skip": false,
             "source": [
               "source_name"
             ],
             "unfold_source": false,
             "target": [
               "target_name"
             ],
             "unfold_target": false,
             "field_mapping": {
               "source_name": "name",
               "target_name": "name"
             },
             "value_mapping": {},
             "selected": [],
             "ignored": [],
             "null_values": [
               ""
             ],
             "update_strategies": {}
           }
         ]
       },
       {
         "id": "4",
         "skip": false,
         "input": {
           "type": "FILE",
           "path": "${store_path}/edge_created.csv",
           "file_filter": {
             "extensions": [
               "*"
             ]
           },
           "format": "CSV",
           "delimiter": null,
           "date_format": "yyyy-MM-dd HH:mm:ss",
           "time_zone": "GMT+8",
           "skipped_line": {
             "regex": "(^#|^//).*|"
           },
           "compression": "NONE",
           "header": null,
           "charset": "UTF-8",
           "list_format": null
         },
         "vertices": [],
         "edges": [
           {
             "label": "created",
             "skip": false,
             "source": [
               "source_name"
             ],
             "unfold_source": false,
             "target": [
               "target_name"
             ],
             "unfold_target": false,
             "field_mapping": {
               "source_name": "name",
               "target_name": "name"
             },
             "value_mapping": {},
             "selected": [],
             "ignored": [],
             "null_values": [
               ""
             ],
             "update_strategies": {}
           }
         ]
       }
     ]
   }
   
   ```
   
   `vertex_person.json` has vertex details and not edge that is why vertices 
has values. Can same file has both vertex & edge details? Please share with one 
simple structs example.
   
   Ref:  
   
   > Some input sources (such as a file) can generate both vertices and edges. 
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   ```javascript
   
   ```
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   ```javascript
   
   ```


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to