7 CQLSH="/usr/bin/cqlsh -k authz"
10 if [ "$*" = "" ]; then
12 for Tdat in `ls *.dat`; do
13 if [ -s "${Tdat}" ]; then
14 DATA="$DATA ${Tdat%.dat}"
22 echo "You are about to REPLACE the data in the $ENV DB for the following tables:"
24 echo -n 'If you are VERY sure, type "YES": '
27 if [ ! "$YES" = "YES" ]; then
34 if [ -s "dats/${T}.dat" ]; then
37 # 2.1.14 still has NULL problems for COPY. Fixed in 2.1.15+
38 "approval"|"artifact"|"cred"|"ns"|"x509"|"role")
39 $CQLSH -e "truncate $T"
40 UPLOAD="$UPLOAD dats/"$T
43 $CQLSH -e "truncate $T; COPY authz.${T} FROM 'dats/${T}.dat' WITH DELIMITER='|'"
49 if [ ! "$UPLOAD" = "" ]; then
50 java -DCASS_ENV=$ENV -jar aaf-auth-batch-*-full.jar Upload $UPLOAD