I am trying to output all tables in a database to an csv or text file.
I can output all the databases by using "show databases" and I can show all the tables in the databases by using "dal_std" but how to loop through all the tables and export it to a csv or text file is what I am trying to do.
I am new to shell scripts but here is what i have so far:
hive -e "show databases" > d.txt
for line in d.txt:
hive -e "show tables in database > output.txt
Any ideas or simply ways to do this?