Deepak Subhramanian 2013-11-13, 11:48
Nitin Pawar 2013-11-13, 13:15
-Re: Converting array<tinyint> in Flume avro default output to string in Hive
sorry hit send to soon ..
correction rather than just changing your table definition.
On Wed, Nov 13, 2013 at 6:45 PM, Nitin Pawar <[EMAIL PROTECTED]>wrote:
> Not really sure there is a direct way to concat anything other than
> strings in hive unless typecasting them to string.
> So you may want to keep the datatype of array elements to strings and try.
> else you may want to build your own udf to do it which looks more elegant
> way rather than just typecasting it.
> On Wed, Nov 13, 2013 at 5:18 PM, Deepak Subhramanian <
> [EMAIL PROTECTED]> wrote:
>> Anyone tried reading the default avro output from flume in Hive.
>> I am using Flume to generate events in the default flume avro output
>> format. Bytes in avro schema are stored as array<tinyint> in Hive when I
>> use avroserde for hive . How do I convert array<tinyint> to string to read
>> the flume body data. I am using hive version 0.10
>> CREATE external TABLE flume_avro_test ROW FORMAT
>> > SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
>> > STORED AS
>> > INPUTFORMAT
>> > OUTPUTFORMAT
>> > LOCATION '/testlogs/2013/11/08/17'
>> > TBLPROPERTIES
>> describe flume_avro_test
>> > ;
>> headers map<string,string> from deserializer
>> body array<tinyint> from deserializer
>> Deepak Subhramanian
> Nitin Pawar
Deepak Subhramanian 2013-11-14, 18:18
Nitin Pawar 2013-11-14, 18:22
Pritchard, Charles X. -ND... 2013-11-14, 18:44