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