Check Hive Table Size: Quick Guide

To check the space usage of a Hive table, you can use the following command:

  1. First, enter the Hive command line interface.
hive
  1. Next, use the DESCRIBE FORMATTED command to view detailed information about the table, including the storage path and file size.
DESCRIBE FORMATTED table_name;
  1. Find the “Total Size” field in the output, which displays the total space occupied by the table.

Additionally, you can use HDFS commands to check the storage path and file size of Hive tables, for example:

hdfs dfs -du -h /user/hive/warehouse/database_name.db/table_name

This will list the storage path of the table and the size of all its files underneath.

bannerAds