Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive: Regex_replace special character issue

Hive: Regex_replace special character issue

New Contributor

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 .

1 REPLY 1
Highlighted

Re: Hive: Regex_replace special character issue

New Contributor

function actual name is regexp_replace and not regex_replace