Export cassandra query result to a csv file

后端 未结 13 1860
刺人心
刺人心 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:08

    Cannot comment... To deal with "MORE" issue when there are more than 100 rows, simply add "paging off" before the SQL.

    Something like

    $ bin/cqlsh -e'PAGING OFF;SELECT video_id,title FROM stackoverflow.videos' > output.txt
    

    This will cause a little messy at the beginning of the output file but can easily be removed afterwards.

提交回复
热议问题