beeline下获取hive建表语句

#!/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
原文地址:https://www.cnblogs.com/tomatoes-/p/9675625.html