The following command not working in cdh4.4.0. Please help



0
hive> CREATE TABLE page_view_avro(
    > view_time INT, 
    > user_id BIGINT,
    > page_url STRING,
    > ip STRING COMMENT 'IP Address of the User')
    > COMMENT 'This is the page view table'
    > PARTITIONED BY(dt STRING, country STRING)
    > STORED AS AVRO;
FAILED: SemanticException Unrecognized file format in STORED AS clause: AVRO

 


1 Answer(s)


0

Hi Abhishek,

Please first register the AvroSerDe in Hive.

Then format the rows based on that. If your Hive version is higher than 0.14+ than you don't need to format it.

Please refer the Cloudera link for more detail information:

https://www.cloudera.com/documentation/enterprise/5-4-x/topics/cdh_ig_hive.html

More information about, how to use Avro file format:

https://cwiki.apache.org/confluence/display/Hive/AvroSerDe

Hope this helps.

Thanks.