I am trying to create an external hive table on existing avro files. Below is the query.
CREATE EXTERNAL TABLE sample
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
location '/user/sshusr/sample/'
TBLPROPERTIES ('avro.schema.url'='/user/sshusr/avsc_files/sample.avsc');
The table got created and I can see the data using simple SELECT queries. But, few columns in avro can have line breakers. For e.g., comments column data can have paragraphs (with new line characters). Due to this the data is not loaded properly on to the table (wherever the avro serde encounters an new line character inside a column, it is treating it as next record/row). I couldn't find any examples on internet. Is there any workaround to handle this situation?
Thanks in advance.