Skip to content

CSV Scanner not working in SFTP context : extraneous or missing \" in quoted-field" #2812

@acornforth

Description

@acornforth

Tested with the same files locally using the csv input, works fine. Something about the records extracted from the csv is breaking when they are pulled from sftp. Not sure is this is something speicif to the SFTP server we are connecting to.

I have already googled for issues, and a found some instance of this error occurring for example when line endings are /r, not /r/n or /n. but i checked this and it doesn't appear to be the cause in our case.

Not sure if this is a benthos issue directly or something to do with the underlying encoding/csv package

config below:

input:
  sftp:
    address: '${SFTP_HOST}:22'
    credentials:
      username: '${SFTP_USER}'
      password: '${SFTP_PASSWORD}'
      private_key_file: '/app/.ssh/id_rsa'
    paths:
      - '/*.csv'
    auto_replay_nacks: true
    scanner:
      csv:
        - parse_header_row: true
    delete_on_finish: false
    watcher:
      enabled: true
      minimum_age: 20s
      poll_interval: 60s
      cache: memory

buffer:
  none: {}
output:
  stdout: {}

cache_resources:
  - label: memory
    memory:
      default_ttl: 7200s
  - label: redis
    redis:
      url: 'redis://${REDIS_HOST}:${REDIS_PORT}'
      prefix: benthos_sftpw_cache_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions