How to view all tables and data sizes in Hive?
You can use the following command to view all tables and data size in Hive:
- Firstly log in to the Hive client, you can log in using the following command:
hive
- Then use the following command to view all databases:
show databases;
- Select the database you want to view and switch to it:
use <database_name>;
- Use the following command to view all tables in the database:
show tables;
- You can use the following command for each table to view the amount of data in the table:
select count(*) from <table_name>;
By following the above steps, you can view all tables in Hive along with their data sizes.