Support Questions

Find answers, ask questions, and share your expertise

Hive: Regex_replace special character issue

avatar
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

avatar
New Contributor

function actual name is regexp_replace and not regex_replace