Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-7103

cbtransfer CSV import exception if row doesn't match headers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.1.0
    • 2.0-beta-2
    • tools
    • Security Level: Public
    • None

    Description

      If a CSV file has a row that has fewer fields than the first "column definition row"... For example...

      lastname,firstname,city
      yaseen,rahim,RS
      ghods,farshid,SF
      yen
      barr,sharon,PA

      Then the cbtransfer CSV importer will throw an exception when it hits the row "yen", as that row has fewer fields (1) than the first field definition row that says there should be 3 fields.

      Traceback (most recent call last):
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 530, in __bootstrap_inner
      self.run()
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 483, in run
      self._target(*self.args, **self._kwargs)
      File "/Users/steveyen/work/membase/dev/voltron.couchbase/build/membase-cli/pump.py", line 264, in run_worker
      source_map, sink_map, self.ctl, curx).run()
      File "/Users/steveyen/work/membase/dev/voltron.couchbase/build/membase-cli/pump.py", line 321, in run
      rv_batch, batch = self.source.provide_batch()
      File "/Users/steveyen/work/membase/dev/voltron.couchbase/build/membase-cli/pump_csv.py", line 84, in provide_batch
      doc[field] = number_try_parse(vals[i])
      IndexError: list index out of range

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            abhinav Abhi Dangeti
            steve Steve Yen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty