Hi Mahender,

You can try ESCAPED BY '\\'

Like a sample below

CREATE EXTERNAL TABLE test
(
a1 int,
b1 string
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' ESCAPED BY '\\'
STORED AS TEXTFILE
LOCATION ‘<HDFS Location>';

Thanks
Rajit


From: mahender bigdata 
<mahender.bigd...@outlook.com<mailto:mahender.bigd...@outlook.com>>
Reply-To: "user@hive.apache.org<mailto:user@hive.apache.org>" 
<user@hive.apache.org<mailto:user@hive.apache.org>>
Date: Tuesday, February 23, 2016 at 2:51 PM
To: "user@hive.apache.org<mailto:user@hive.apache.org>" 
<user@hive.apache.org<mailto:user@hive.apache.org>>
Subject: a newline in column data ruin Hive

Hi,

We are facing issue while loading/reading data from file which has line 
delimiter characters like \n  has part of column data. When we try to query the 
Hive table, data with \n gets split up into multiple rows. Is there a way to 
tell hive to skip escape character like \n ( row delimiter or field delimiter) 
within in column data.  We saw LINE Terminator property in create table syntax, 
but currently it accepts only \n. Is there a way to have custom line terminator 
property.

Thanks in advance

________________________________
DISCLAIMER: The information transmitted is intended only for the person or 
entity to which it is addressed and may contain confidential and/or privileged 
material. Any review, re-transmission, dissemination or other use of, or taking 
of any action in reliance upon this information by persons or entities other 
than the intended recipient is prohibited. If you received this in error, 
please contact the sender and destroy any copies of this document and any 
attachments.

Reply via email to