Below statement writes the query output to a file ‘output.txt’.
cqlsh -e'query' > output.txt
$ cqlsh -e'SELECT * FROM cassandratutorial.employee' > output.txt
$
$ cat output.txt
id | age | firstname | lastname
----+-----+-----------+----------
1 | 30 | Krishna | Gurram
2 | 31 | Ram | Gurram
4 | 45 | Chitra | Rajan
3 | 45 | Vijay | Ponnam
(4 rows)
No comments:
Post a Comment