importer导入csv文件提示prop index 4 out range 4 of record

提问参考模版:

  • nebula 版本:V2.6.2, importer 2.6.0
  • 部署方式:分布式
  • 安装方式:tar
  • 是否为线上版本:Y / N
  • 硬件信息
    • 磁盘( 推荐使用 SSD)
    • CPU、内存信息
  • 问题的具体描述
version: v2

description: example

removeTempFiles: false

clientSettings:

  retry: 3

  concurrency: 3 # number of graph clients

  channelBufferSize: 128

  space: rational_drug_v2

  connection:

    user: graph53

    password: jss@123

    address: 192.168.107.53:9689

  postStart:

    commands: 

      DROP SPACE IF EXISTS rational_drug_v2;

      CREATE SPACE IF NOT EXISTS rational_drug_v2(partition_num=5, replica_factor=1, vid_type=FIXED_STRING(32));
	  
      USE rational_drug_v2;

      CREATE TAG place_0_0(id string, countryName string, website string, country string);

    afterPeriod: 8s

  preStop:

    commands: |

logPath: /home/graph53/cncao/nebula/err/test.log

files:

  - path: /home/graph53/cncao/data/place_0_0.csv

    failDataPath: /home/graph53/cncao/nebula/err/place_0_0.csv

    batchSize: 2

    inOrder: true

    type: csv

    csv:

      withHeader: false

      withLabel: false

      delimiter: ","

    schema:

      type: vertex

      vertex:

        vid:

           index: 0

           type: string

        tags:

          - name: place_0_0

            props:

              - name: id

                type: string

                index: 1

              - name: countryName

                type: string

                index: 2

              - name: website

                type: string

                index: 3

              - name: country

                type: string

                index: 4


执行./nebula-importer --config test.yaml
scv文件内容:
0,India,http://dbpedia.org/resource/India,country
1,China,http://dbpedia.org/resource/China,country

代码 / 终端输出 / 日志…

2022/02/23 15:58:09 [INFO] clientmgr.go:28: Create 3 Nebula Graph clients
2022/02/23 15:58:09 [INFO] reader.go:26: The delimiter of /home/graph53/cncao/data/place_0_0.csv is U+002C ','
2022/02/23 15:58:09 [INFO] reader.go:64: Start to read file(0): /home/graph53/cncao/data/place_0_0.csv, schema: < :VID(string),place_0_0.id:string,place_0_0.countryName:string,place_0_0.website:string,place_0_0.country:string >
2022/02/23 15:58:12 [ERROR] handler.go:63: Client 0 fail to execute: THERE_ARE_SOME_ERRORS(tag: {0xc0000b8260 [0xc00000c2b8 0xc00000c2d0 0xc00000c2e8 0xc00000c300]}, error: Prop index 4 out range 4 of record([0 India http://dbpedia.org/resource/India country])), ErrMsg: SyntaxError: syntax error near `THERE_ARE_SOME_ERRORS', ErrCode: -1004
2022/02/23 15:58:12 [ERROR] handler.go:63: Client 2 fail to execute: THERE_ARE_SOME_ERRORS(tag: {0xc0000b8260 [0xc00000c2b8 0xc00000c2d0 0xc00000c2e8 0xc00000c300]}, error: Prop index 4 out range 4 of record([6 Bosnia_and_Herzegovina http://dbpedia.org/resource/Bosnia_and_Herzegovina country])), ErrMsg: SyntaxError: syntax error near `THERE_ARE_SOME_ERRORS', ErrCode: -1004
2022/02/23 15:58:12 [ERROR] handler.go:63: Client 1 fail to execute: THERE_ARE_SOME_ERRORS(tag: {0xc0000b8260 [0xc00000c2b8 0xc00000c2d0 0xc00000c2e8 0xc00000c300]}, error: Prop index 4 out range 4 of record([2 Angola http://dbpedia.org/resource/Angola country])), ErrMsg: SyntaxError: syntax error near `THERE_ARE_SOME_ERRORS', ErrCode: -1004
2022/02/23 15:58:15 [INFO] statsmgr.go:62: Tick: Time(15.00s), Finished(6), Failed(6), Read Failed(0), Latency AVG(0us), Batches Req AVG(0us), Rows AVG(0.40/s)
2022/02/23 15:58:15 [ERROR] handler.go:63: Client 1 fail to execute: THERE_ARE_SOME_ERRORS(tag: {0xc0000b8260 [0xc00000c2b8 0xc00000c2d0 0xc00000c2e8 0xc00000c300]}, error: Prop index 4 out range 4 of record([11 Dominican_Republic http://dbpedia.org/resource/Dominican_Republic country])), ErrMsg: SyntaxError: syntax error near `THERE_ARE_SOME_ERRORS', ErrCode: -1004

看您的csv 只有 0-3 的列,配置里填的 0-4 都有,我觉得 id 的 index 应该是0, 以此类推

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。