Created
March 30, 2020 23:06
-
-
Save johnrc/ca410cd03c70089c9da43e5efe01f967 to your computer and use it in GitHub Desktop.
Simple script to export Cassandra table to csv file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
table=$1 | |
filename=$2 | |
cqlsh -e "COPY $table TO './$filename' WITH HEADER = true;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment