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

cqlsh: Accept and execute CQL statement(s) from command-line parameter

    XMLWordPrintableJSON

Details

    Description

      I don't know if there is a workaround for this, but currently, if I want to dump the output of a statement into a file, I need to save the statements into another file and pass it as input to cqlsh. Something like:

      $ cqlsh -f [statement_file] > [output_file]

      I am aware of the existence of the cqlsh CAPTURE command but it doesn't work for everything (particularly, for cqlsh-only commands like DESCRIBE)

      To solve this, I propose that you add an "-e" parameter to cqlsh that accepts a valid CQL statement to execute. This is exactly the same as MySQL CLI's "-e" parameter: http://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html#option_mysql_execute

      Attachments

        1. CASSANDRA-2.0-7172.patch
          4 kB
          Mikhail Stepura

        Activity

          People

            mishail Mikhail Stepura
            pjc08 PJ
            Mikhail Stepura
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: