`

HIVE备份之批量导出所有的HIVE建表字段

    博客分类:
  • hive
 
阅读更多

 

 

 

思路:
最基本的两个语句:show tables; show create tables XXX.

脚本:
#!/bin/bash

 hive -e "show tables;" > tables.txt

sleep(2)

     cat tables.txt |while read eachline
     do
     hive -e "show create table $eachline" >>tablesDDL.txt
     done
   

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics