Export cassandra query result to a csv file

后端 未结 13 1924
刺人心
刺人心 2020-12-08 06:18

I\'m new in cassandra, and I have to export the result of a specific query to a csv file.

I found the COPY command, but (from what I understand) it allo

13条回答
  •  青春惊慌失措
    2020-12-08 07:16

    CQL COPY is good option for importing or exporting data. But if you want to analyze some small query output you can run below command and save the output in a file.

    cqlsh -e "SELECT * FROM table WHERE column = 'xyz' > queryoutput.txt

    However, you can use CAPTURE also for saving output of the query to analyze something

提交回复
热议问题