Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #Call DESCRIBE
  2. out=$(hive client -S -e "use $HIVE_SCHEMA; DESCRIBE EXTENDED $table")
  3.  
  4. #Get location for example
  5. table_location=$(echo "${out}" | egrep -o 'location:[^,]+' | sed 's/location://')
  6. echo Table location: $table_location
  7. #removing the path
  8. #hdfs dfs -rm -r -skipTrash $table_location #need to remove this comment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement