Sorry, by default, the schema vid type will be string if the type field is omitted.
w/o schema.vertex.vid.type being specified:
- path: ./person.csv
failDataPath: ./err/person.csv
batchSize: 32
inOrder: true
type: csv
csv:
withHeader: false
withLabel: false
schema:
type: vertex
vertex:
vid:
index: 0
tags:
- name: person
props:
- name: name
type: string
index: 1
string was set
2021/12/20 09:04:45 --- START OF NEBULA IMPORTER ---
2021/12/20 09:04:45 [WARN] config.go:554: Not set files[0].schema.vertex.vid.Type, reset to default value `string'
2021/12/20 09:04:45 [WARN] config.go:554: Not set files[1].schema.vertex.vid.Type, reset to default value `string'
2021/12/20 09:04:53 [INFO] clientmgr.go:28: Create 4 Nebula Graph clients
2021/12/20 09:04:53 [INFO] reader.go:64: Start to read file(0): /root/person.csv, schema: < :VID(string),person.name:string >
2021/12/20 09:04:53 [INFO] reader.go:64: Start to read file(1): /root/corp.csv, schema: < :VID(string),corp.name:string >
...
After specifying type:
@@ -30,6 +30,7 @@
vertex:
vid:
index: 0
+ type: int
tags:
- name: person
props:
@@ -50,6 +51,7 @@
vertex:
vid:
index: 0
+ type: int
tags:
- name: corp
props:
Now, int
was used.
2021/12/20 09:05:53 --- START OF NEBULA IMPORTER ---
2021/12/20 09:06:01 [INFO] clientmgr.go:28: Create 4 Nebula Graph clients
2021/12/20 09:06:01 [INFO] reader.go:64: Start to read file(1): /root/corp.csv, schema: < :VID(int),corp.name:string >
2021/12/20 09:06:01 [INFO] reader.go:64: Start to read file(0): /root/person.csv, schema: < :VID(int),person.name:string >
...
2021/12/20 09:06:02 Finish import data, consume time: 8.65s
2021/12/20 09:06:03 --- END OF NEBULA IMPORTER ---
I think this should be highlighted somewhere in the readme. Sorry for confusing you!