#!/bin/bash
tables=$(hive -e “show tables;”)
for table in
t
a
b
l
e
s
;
d
o
e
c
h
o
"
tables; do echo "
tables;doecho"(hive -e “show create table $table;”);" >> /data01/***.txt
done
这个取的是默认库(default)下面的表,如需取指定库下的表,情指定库名。。。
将hive库中的建表语句导出到本地文件中的脚本
最新推荐文章于 2024-03-14 14:45:06 发布