Reply
New Contributor
Posts: 1
Registered: ‎04-26-2017

Hive: Regex_replace special character issue

Hi Experts ,

 

I have a string column in a hive table and it  each row contains few lines of text in the that string column .

file looks like below 3 lines . .

daodaodkaodiaoraajdbajgioraeaeama

fmrkfjiffm=\n,daodjaoduaofaklfmadkaodk

adaiuaidjadmdoajdaodkada;d,adadoo

 

I am trying to replace "=\n" with a space ( '')  with regex_replace( columnname , '^=\\n$|=\\n', '')

but it seems it's working .  Also if i simply write SELECT  'fmrkfjiffm=\n,daodjaoduaofaklfmadkaodk' in hue

and run , I see only  'fmrkfjiffm= ,daodjaoduaofaklfmadkaodk' which is quite weird for me .

 

Is this a character set issue ?

 

Please help me sharing your knowledge on this. Thanks in advance .

Announcements