blob: 94695ed19a008c74f95595a45fc188281f6f0a63 [file] [log] [blame]
Instrumentalbc299c02018-09-25 06:42:31 -05001#!/bin/bash
2#
3# Pull data from Cassandra into ".dat" files, and "gzip" them
4#
5DIR=/opt/app/aaf/cass_init
6cd $DIR
7mkdir -p dats
8cd dats
9TABLES="$(cqlsh -e "use authz; describe tables")"
10for T in $TABLES ; do
11 cqlsh -e "use authz; COPY $T TO '$T.dat' WITH DELIMITER='|';"
12done
13cd $DIR
14tar -cvzf dat.gz dats/*.dat
15rm -Rf dats
16