Hive can list the data files in a table. For eg the following query lists all the data files for the table or partition:
This has two advantages over the existing "show files" functionality:
- The output can be used in arbitrary SQL statements.
- You can see which record came from which file.