Member since
04-30-2019
4
Posts
0
Kudos Received
0
Solutions
05-03-2019
04:21 AM
Sorry we don't have access for that .Can you please share that it will be useful for my future. Now i written different approach to get all hdfs paths and trying to delete them all in one shot .is there anyway to do that. hive -e " set hive.cli.print.header=false; use $HIVE_SCHEMA;show tables like '*stg';" 1> $tablelist tableNum_limit=$(cat $tablelist | wc -l) echo "number of tables in the file $tableNum_limit " #sed -i e"s/.*/SHOW CREATE TABLE $HIVE_SCHEMA.&;\" $tablelist sed -i -e "s/.*/DESCRIBE FORMATTED $HIVE_SCHEMA.&;/" $tablelist #create the file with all describe formatted output hive -f $tablelist > $loctbl #remove all the line except the hdfs path sed -i -e '/^Location/!d;s/Location:\s\+//' $loctbl #sed -Eni '{N; /^LOCATION\s+/p ; D}' $loctbl It will retrieve all the hdfs paths into file for the given database and I am trying to delete them is there any short way to delete all in stead of using hdfs dfs -rm -r -skipTrash $table_location each path .
... View more