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:

  1. Firstly log in to the Hive client, you can log in using the following command:
hive
  1. Then use the following command to view all databases:
show databases;
  1. Select the database you want to view and switch to it:
use <database_name>;
  1. Use the following command to view all tables in the database:
show tables;
  1. 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.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds