Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Rising Star

SYMPTOM

CREATE EXTERNAL TABLE test(
id STRING,
dept STRING)
row format delimited
fields terminated by ','
location '/user/hdfs/testdata/';

ROOT CAUSE

The files under location provided while creating table are structured in following way

/user/hdfs/testdata/1/test1
/user/hdfs/testdata/2/test2
/user/hdfs/testdata/3/test3
/user/hdfs/testdata/4/test4

RESOLUTION

To make the subdirectories accessible set the following two properties before executing the create table statement

set mapred.input.dir.recursive=true;
set hive.mapred.supports.subdirectories=true;
3,511 Views
Version history
Last update:
‎06-30-2017 07:40 AM
Updated by:
Contributors