posts - 126,comments - 1,trackbacks - 0

#!/bin/bash 
     hive -S -e "use 数据库名;show tables;" >tables.txt
    cat tables.txt | while read eachline
    do
     hive -S -e "use 数据库名;show create table ${eachline};" >> tablesDDL.hql
    done

 

posted on 2018-09-19 17:14 Tomatoes 阅读(...) 评论(...) 编辑 收藏