Update copyDataToImpalaCluster.sh

This commit is contained in:
dimitrispie 2023-06-14 19:23:42 +03:00
parent 2032b0df40
commit 42b8ce2ba4
1 changed files with 2 additions and 2 deletions

View File

@ -22,13 +22,13 @@ function copydb() {
hdfs dfs -conf /etc/impala_cluster/hdfs-site.xml -chmod -R 777 /tmp/$FILE/${db}.db
# drop tables from db
for i in `impala-shell --user $HADOOP_USER_NAME-i impala-cluster-dn1.openaire.eu -d ${db} --delimited -q "show tables"`;
for i in `impala-shell --user $HADOOP_USER_NAME -i impala-cluster-dn1.openaire.eu -d ${db} --delimited -q "show tables"`;
do
`impala-shell -i impala-cluster-dn1.openaire.eu -d -d ${db} -q "drop table $i;"`;
done
# drop views from db
for i in `impala-shell --user $HADOOP_USER_NAME-i impala-cluster-dn1.openaire.eu -d ${db} --delimited -q "show tables"`;
for i in `impala-shell --user $HADOOP_USER_NAME -i impala-cluster-dn1.openaire.eu -d ${db} --delimited -q "show tables"`;
do
`impala-shell -i impala-cluster-dn1.openaire.eu -d -d ${db} -q "drop view $i;"`;
done