copy all from local to hive

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#copy all files from /home/mvolosnikova/tst_data/tables/* into hive
#!/bin/sh
for i in /home/mvolosnikova/tst_data/tables/*
do
if [ -d "$i" ]
then
echo hive -e "load data local inpath '$i' into table ${i##*/}"
fi
done