Hive 批量导出建表语句
#!/bin/bash
rm -rf tablesDDL.txt
for hiveTabName in $(hive -e "show tables 'rcd*';")
do
hive -e "show create table $hiveTabName" >>tablesDDL.txt
echo -e "---------------------------- $hiveTabName table structure generate finished! -------------------------------\n\n">>tablesDDL.txt
done