Read Files under Sub-Directories for Hive and Impala

Sometimes you might want to store data under sub-directories in HDFS and then you want Hive or Impala to read from those sub-directories. For example, you have the following directory structure: root hdfs     231206 2017-06-30 02:45 /test/table1/000000_0 root hdfs          0 2017-06-30 02:45 /test/table1/child_directory root …