I have created the external hive table like below and tried to read the file in the location.
sample input:
c1,c2,c3,c4,c5
ass,adda,ada,er,asa
asdasd,asd,asas,qwqw,dfdf
Extended table with partition
create external table tablename(field3 varchar(50), field4 varchar(50), filed5 varchar(50))
partitioned by (field1 varchar(50), field2 varchar(50))
ROW FORMAT DELIMITED
fields terminated by ','
lines terminated by '\n'
location '/path/to/Folder/'
tblproperties ("skip.header.line.count"="1");
Only one csv file in the folder location which has 5 columns and 1k rows
After creating the table when I tried to run select query, no results is showing.
Then I tried creating the external table without partitioning like below and getting output when I run select query.
create external table tablename(field1 varchar(50), field2 varchar(50),field3 varchar(50), field4 varchar(50), filed5 varchar(50))
ROW FORMAT DELIMITED
fields terminated by ','
lines terminated by '\n'
location '/path/to/Folder/'
tblproperties ("skip.header.line.count"="1");
I dont know where I am doing mistake. I am pretty new to hive. So kindly help me.