posts - 126,comments - 2,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  阅读(798)  评论(0编辑  收藏