#!/bin/bash
#
-# Push data from Cassandra ".dat" files
+# Push data from Cassandra ".dat" files into Tables
# These are obtained from "gzipped" files, or pre-placed (i.e. initialization)
# in the "dats" directory
#
cd dats
for T in $(ls *.dat); do
if [ -s $T ]; then
- cqlsh -e "use authz; COPY ${T%.dat} FROM '$T' WITH DELIMITER='|';"
+ cqlsh -e "COPY authz.${T/.dat/} FROM '$T' WITH DELIMITER='|';"
fi
done
cd $DIR
#rm -Rf dats
+