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

cbimport does not handle MONO_INCR starting at non-default value

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Yes

    Description

      Problem
      cbimport does not handle MONO_INCR starting at non-default value, the follow error is produce

      JSON import failed: unable to parse MONO_INCR start point [100
      

      Steps to reproduce

      1. Create the test file:

        people.json

        {"id": 1001,"name": "prasad","type":"employee","division": "Couchbase Cloud","manager": false,"salary": 1000.20,"office": "Santa Clara"}
        {"id": 1002,"name": "rahul","type":"employee","division": "Couchbase Cloud","manager": true,"salary": 10000.20,"office": null}
        {"id": 1003,"name": "jon","type":"employee","division": "Couchbase Cloud","manager": false,"salary": 2000.59}
        {"id": 1004,"name": "idris","type":"employee","division": "Couchbase Server","manager": false,"salary": 5000,"office": "New York"}
        {"id": 1005,"name": "anil","type":"contractor","division": "Product Management","manager": false,"salary": 12345.67}
        

      2. Run cbimport:

        /opt/couchbase/bin/cbimport json -c localhost -u Administrator -p password -b people -f lines -d file://people.json --generator-delimiter '@' -g %id%::%name%#@MONO_INCR[100]@
        JSON import failed: unable to parse MONO_INCR start point [100
        

         

      Expectation
      For documents to import with keys set correctly:

      1001::prasad::100
      1002::rahul::101
      

       

       

      Attachments

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

        Activity

          People

            krishna.doddi Krishna Doddi
            krishna.doddi Krishna Doddi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty