Q&A
Ask and answer questions to make information more available to wider audiences.
Nevaeh Joiner @joinernevaeh   14, Jun 2023 12:00 AM
access subdirectories recursively
How can we access the subdirectories recursively?
answers 1
 
Answer 1
Jose Grimsbro @josegrimsbro   21, Jun 2023 12:33 PM
By using the below commands, we can access subdirectories recursively in Hive:

hive> Set mapred.input.dir.recursive=true;
hive> Set hive.mapred.supports.subdirectories=true;
Hive tables can be pointed to the higher level directory, and this is suitable for the directory structure:

/data/country/state/city/