Skip to content

Instantly share code, notes, and snippets.

@johnrc
Created March 30, 2020 23:06
Show Gist options
  • Save johnrc/ca410cd03c70089c9da43e5efe01f967 to your computer and use it in GitHub Desktop.
Save johnrc/ca410cd03c70089c9da43e5efe01f967 to your computer and use it in GitHub Desktop.
Simple script to export Cassandra table to csv file
#!/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