思路:
最基本的两个语句:show tables; show create tables XXX.
脚本:
#!/bin/bash
hive -e "show tables;" > tables.txt
sleep(2)
cat tables.txt |while read eachline
do
hive -e "show create table $eachline" >>tablesDDL.txt
done
思路:
最基本的两个语句:show tables; show create tables XXX.
脚本:
#!/bin/bash
hive -e "show tables;" > tables.txt
sleep(2)
cat tables.txt |while read eachline
do
hive -e "show create table $eachline" >>tablesDDL.txt
done