nebula-importer 导入csv报错 bare " in non-quoted-field

  • nebula 版本:3.0.2

  • 部署方式:单机

  • 安装方式:nebula-graph-3.0.2.ubuntu1804.amd64.deb

  • 问题的具体描述
    导入csv文件数据,这3条数据一直报错.
    在这个回答中,看到好像是双引号的问题,但是并没有给出解决方案 nebula-importer 出错的,错误文件,不保存错误的行

导入的数据如下

:VID	song_introduction.introduction:string
3e9f325baa10cd1e3f5ca28bee943f5df3d4e1ee9b92d0836b0e539e2bedcf440182a234	đoạn độc thoại của ""cân"" google
ad1b3de9984aa06b46bbe71b698238da3f02635e8eb493f572482eaacbfdb4764b2f4cfc	Khi bà nhí 3 tuổi mẹ:""Vì con không khoái bạn""
dfd0cafb3d970de2173f5f8be94399e088613f6e23e74974992c36e94ffbc033de03e8e3	카리스마 안경선배의 외침 ""영미야!""

报错日志

2022/04/21 08:23:27 [INFO] clientmgr.go:28: Create 10 Nebula Graph clients
2022/04/21 08:23:27 [INFO] reader.go:26: The delimiter of /home/zuochen/data/proj/scripts/test_data/song_introduction.csv is U+0009
2022/04/21 08:23:27 [INFO] reader.go:64: Start to read file(0): /home/zuochen/data/proj/scripts/test_data/song_introduction.csv, schema: < :VID(string),song_introduction.introduction:string >
2022/04/21 08:23:27 [ERROR] reader.go:169: Fail to read file(/home/zuochen/data/proj/scripts/test_data/song_introduction.csv) line 2, error: parse error on line 2, column 103: bare " in non-quoted-field
2022/04/21 08:23:27 [ERROR] reader.go:169: Fail to read file(/home/zuochen/data/proj/scripts/test_data/song_introduction.csv) line 3, error: parse error on line 3, column 101: bare " in non-quoted-field
2022/04/21 08:23:27 [ERROR] reader.go:169: Fail to read file(/home/zuochen/data/proj/scripts/test_data/song_introduction.csv) line 4, error: parse error on line 4, column 110: bare " in non-quoted-field
2022/04/21 08:23:27 [INFO] reader.go:180: Total lines of file(/home/zuochen/data/proj/scripts/test_data/song_introduction.csv) is: 4, error lines: 3

yaml配置

# 连接的 Nebula Graph 版本,连接 3.x 时设置为 v3。
version: v3

description: test_import_musicid

# 是否删除临时生成的日志和错误数据文件。
removeTempFiles: false

clientSettings:

  # nGQL 语句执行失败的重试次数。
  retry: 3

  # Nebula Graph 客户端并发数。
  concurrency: 10 

  # 每个 Nebula Graph 客户端的缓存队列大小。
  channelBufferSize: 128

  # 指定数据要导入的 Nebula Graph 图空间。
  space: test_space

  # 连接信息。
  connection:
    user: root
    password: nebula
    address: 127.0.0.1:9669

  postStart:
    # 配置连接 Nebula Graph 服务器之后,在插入数据之前执行的一些操作。
    commands: |

    # 执行上述命令后到执行插入数据命令之间的间隔。
    afterPeriod: 15s

  preStop:
    # 配置断开 Nebula Graph 服务器连接之前执行的一些操作。
    commands: |

# 错误等日志信息输出的文件路径。    
logPath: ./err/test.log

# CSV 文件相关设置。
files:


    # 数据文件的存放路径,如果使用相对路径,则会将路径和当前配置文件的目录拼接。本示例第一个数据文件为点的数据。
  - path: ./test_data/song_introduction.csv

    # 插入失败的数据文件存放路径,以便后面补写数据。
    failDataPath: ./err/song_introduction_err.csv

    # 单批次插入数据的语句数量。
    batchSize: 128

    # 读取数据的行数限制。
    limit: 1280000000

    # 是否按顺序在文件中插入数据行。如果为 false,可以避免数据倾斜导致的导入速率降低。
    inOrder: true

    # 文件类型,当前仅支持 csv。
    type: csv

    csv:
      # 是否有表头。
      withHeader: true

      # 是否有 LABEL。
      withLabel: false

      # 指定 csv 文件的分隔符。只支持一个字符的字符串分隔符。
      delimiter: "\t"

    schema:
      # Schema 的类型,可选值为 vertex 和 edge。
      type: vertex
      vertex:
        vid:
          index: 0
        tags:
          - name: song_introduction
            props:
              - name: introduction
                type: string
                index: 1
2 个赞

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