hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From unmesha sreeveni <unmeshab...@gmail.com>
Subject Re: How to retriew data from a specific bucket in hive?
Date Mon, 01 Dec 2014 05:57:24 GMT
On Mon, Dec 1, 2014 at 11:15 AM, yogendra reddy <yogendra.60@gmail.com>
wrote:

> hive --orcfiledump


​Hi yogendra​

​shows ​
Exception in thread "main" java.io.IOException: Malformed ORC file
/employeeData/empLargenew.txt. Invalid postscript.
​But ​my file is not ORC format it is .csv format

*1,Anne,Admin,50000,A*
*2,Gokul,Admin,50000,B*

So as a workaround I loaded data into a table

* create external table stagingMB (EmployeeID Int,FirstName
String,Designation String,Salary Int,Department String) row format
delimited fields terminated by "," location '/employeeData';*

and from the above table I loaded the data into ORC table

 *create table HiveMB (EmployeeID Int,FirstName String,Designation
String,Salary Int,Department String) clustered by (Department) into 3
buckets stored as orc TBLPROPERTIES ('transactional'='true') ;  *

* from stagingMB insert into table HiveMB  select
employeeid,firstname,designation,salary,department;  *


-- 
*Thanks & Regards *


*Unmesha Sreeveni U.B*
*Hadoop, Bigdata Developer*
*Centre for Cyber Security | Amrita Vishwa Vidyapeetham*
http://www.unmeshasreeveni.blogspot.in/

Mime
View raw message