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

CBImport should have the ability to omit certain fields

    XMLWordPrintable

Details

    Description

      Summary: When importing data from CSV, it would be helpful to be able to omit certain fields from being loaded into the document. A practical application would be that you want to use a certain field to construct the document key, but don't want to include that field in the actual content.

      Suggestion: Maybe another flag like --omit-fields fieldname1,fieldname2, etc? Any fields being omitted should still be able to be used with --generate-key

       

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-29468
          # Subject Branch Project Status CR V

          Activity

            There are already command line tools that are very good at changing CSV files, could one of those be used first before passing the file to cbimport.

            On a unix system using cut

            From the Windows side powershell has great support for this too

            If the user is not experience with the command line then all spreadsheet programs support importing and exporting CSV files. The file can be imported, mutated and exported.

            I be careful about adding a feature that can easily be achieve by use one extra simple step.

            pvarley Patrick Varley added a comment - There are already command line tools that are very good at changing CSV files, could one of those be used first before passing the file to cbimport. On a unix system using cut From the Windows side powershell has great support for this too If the user is not experience with the command line then all spreadsheet programs support importing and exporting CSV files. The file can be imported, mutated and exported. I be careful about adding a feature that can easily be achieve by use one extra simple step.
            pvarley Patrick Varley added a comment - - edited

            I guess the one point that is worth making is that to generated the key, the CSV has to have that data, so there is data duplication between a field in the document and the key. This is a good reason why the feature has to be in cbimport.

            pvarley Patrick Varley added a comment - - edited I guess the one point that is worth making is that to generated the key, the CSV has to have that data, so there is data duplication between a field in the document and the key. This is a good reason why the feature has to be in cbimport.

            MB-27676 added support to omit one field.

            pvarley Patrick Varley added a comment - MB-27676 added support to omit one field.

            Need to add support to CSV and the ability to specify multiple fields.

            pvarley Patrick Varley added a comment - Need to add support to CSV and the ability to specify multiple fields.

            Build couchbase-server-7.0.0-1007 contains backup commit 086ca6b with commit message:
            MB-29468 Added the ability to ignore multiple fields in cbimport

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-1007 contains backup commit 086ca6b with commit message: MB-29468 Added the ability to ignore multiple fields in cbimport

            Build couchbase-server-6.6.0-7625 contains backup commit 086ca6b with commit message:
            MB-29468 Added the ability to ignore multiple fields in cbimport

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.0-7625 contains backup commit 086ca6b with commit message: MB-29468 Added the ability to ignore multiple fields in cbimport

            People

              james.lee James Lee
              matthew.groves Matthew Groves
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty