blob: b25099f814a55a1408ebc098a5c553f3950a5da6 [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
Instrumentalc8dbe982018-10-08 15:49:00 -050011 cqlsh -e "COPY authz.$T TO '$T.dat' WITH DELIMITER='|';"
Instrumentalbc299c02018-09-25 06:42:31 -050012done
13cd $DIR
14tar -cvzf dat.gz dats/*.dat
15rm -Rf dats
16