Skip to content

Instantly share code, notes, and snippets.

@johnrc
Created March 30, 2020 23:06
Show Gist options
  • Select an option

  • Save johnrc/ca410cd03c70089c9da43e5efe01f967 to your computer and use it in GitHub Desktop.

Select an option

Save johnrc/ca410cd03c70089c9da43e5efe01f967 to your computer and use it in GitHub Desktop.

Revisions

  1. johnrc created this gist Mar 30, 2020.
    6 changes: 6 additions & 0 deletions export-cassandra.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/bash

    table=$1
    filename=$2

    cqlsh -e "COPY $table TO './$filename' WITH HEADER = true;"