Guest User

Untitled

a guest
Nov 18th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. mysqltable=$(echo "$table" | sed 's/[][]//g;s/'"'"'//g')
  2. hive_table=$(echo -n $mysqltable | tr -c '[:alnum:]' _)
  3. validateTable=$(hive --database "${hivedb}" -e "SHOW TABLES LIKE '$hive_table'")
  4. if [[ -z $validateTable ]]; then
  5. sh -x /home/"$USER"/"${hivedb}"/import.sh "${mysqltable}"
  6. else
  7. sh -x /home/"$USER"/"${hivedb}"/append.sh "${mysqltable}"
  8. fi
Add Comment
Please, Sign In to add comment