This post will show you how to retrieve a list of the files that make up a certain table, or a partition inside a partitioned table.
The SHOW FILES command is only accessible in Impala 2.2 and above. This will provide the names of the files, the sizes of each file, and the appropriate partition for a partitioned table. The size contains a suffix of B for bytes, MB for megabytes, and GB for gigabytes.
Syntax:
SHOW FILES IN <tablename>
Example:
SHOW FILES IN empavro2;
SHOW FILES IN townslist;
SHOW FILES IN Employee_Parquet2;
Click on the image to enlarge.
If you observe the image, the table “townslist” is made of two CSV files and the remaining tables have 1 file associated to it.
Hope you find this article helpful.
Please stay in touch for more interesting updates.
One comment