You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Edward Capriolo <ed...@gmail.com> on 2012/05/29 02:13:11 UTC
How to output into a binary table
I am trying to find the example binary_output_format.q.
create table abinary (num1 int, num2 int) ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' with
SERDEPROPERTIES ( 'serialization.last.column.takes.rest'='true' )
STORED AS
INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveBinaryOutputFormat';
hive> INSERT OVERWRITE TABLE abinary select * from a;
od -a /user/hive/warehouse/abinary/000000_0;
0000000 4 soh 5 3 soh 2
No matter what I seem to do I can not get hive to emit the \n. I see
how the transform clause in the .q file does this but it can HQL do
this?
TX