Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-19985

Enhance CQLSH to support machine-readable output formatting

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • CQL/Interpreter
    • None
    • Operability
    • Normal
    • All
    • None

    Description

      Existing CQLSH output formatting provides tabular formatting using grid-like separators and text alignment which is designed for user readability. 

      When CQL is run for non-interactive tasks as part of a pipeline this formatting complicates the machine processing of the output. As an example, Sqlite has a command line flag -mode to switch between tablular, csv, and several other supported formats.

      This enhancement will provide a new mode argument which will initially offer tabular and csv output formats. Tabular will remain the default so there will be no change for existing users.  In the future, other modes such as json and insert could be added.

      --mode={tabular, csv}
      Specify an output display format. The default is tabular.
      

      The existing Copy To can be used for exporting to CSV, but it doesn't allow for query criteria.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bschoeni Brad Schoening
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: