#!/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  阅读(1965)  评论(0编辑  收藏  举报