fix push/pull 18/70018/1
authorInstrumental <jonathan.gathman@att.com>
Mon, 8 Oct 2018 20:49:00 +0000 (15:49 -0500)
committerInstrumental <jonathan.gathman@att.com>
Mon, 8 Oct 2018 20:49:10 +0000 (15:49 -0500)
Issue-ID: AAF-543
Change-Id: Iaf2956866befcf0b1229c2146ebf138b3aa78513
Signed-off-by: Instrumental <jonathan.gathman@att.com>
auth/auth-cass/cass_init/pull.sh
auth/auth-cass/cass_init/push.sh

index 94695ed..b25099f 100644 (file)
@@ -8,7 +8,7 @@ mkdir -p dats
 cd dats
 TABLES="$(cqlsh -e "use authz; describe tables")"
 for T in $TABLES ; do
-  cqlsh -e "use authz; COPY $T TO '$T.dat' WITH DELIMITER='|';"
+  cqlsh -e "COPY authz.$T TO '$T.dat' WITH DELIMITER='|';"
 done
 cd $DIR
 tar -cvzf dat.gz dats/*.dat
index 30e830e..09a0fcc 100644 (file)
@@ -17,8 +17,9 @@ fi
 cd dats
 for T in $(ls *.dat); do
   if [ -s $T ]; then
-    cqlsh -e "use authz; COPY $T FROM '$T.dat' WITH DELIMITER='|';"
+    cqlsh -e "COPY authz.${T/.dat/} FROM '$T' WITH DELIMITER='|';"
   fi
 done
 cd $DIR
 #rm -Rf dats
+