Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)
New Contributor

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;
2,057 Views
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎06-30-2017 07:40 AM
Updated by:
 
Contributors
Top Kudoed Authors