脚本内容如下
` #!/bin/bash
##获取数据库
databases=$(hive -e "show databases; exit;")
for database in $databases;
do
#获取hive建表语句
tables=$(hive -e "use $database; show tables;")
for table in $tables;
脚本内容如下
` #!/bin/bash
##获取数据库
databases=$(hive -e "show databases; exit;")
for database in $databases;
do
#获取hive建表语句
tables=$(hive -e "use $database; show tables;")
for table in $tables;