Removing special characters using Hive

人盡茶涼 提交于 2019-12-25 03:58:27

问题


I have data stored in Cassandra 1.2 as shown below. There is special character under sValue - highlighted as bold. How can I use hive function to remove this ?

Date | Timestam | payload_Timestamp | actDate | actHour | actMinute | sDesc | sName | sValue ---------------------------------+--------------------------------------+--------------------------+----------------------+----------------------+------------------------+---------------------------+--------------------------------+--------------------- 2014-06-25 00:00:00-0400 | 2014-06-25 08:31:23-0400 | 2014-06-25 08:31:23-0400 | 06-25-2014 | 8 | 31 | lable | /t1/t2/100/200/11/99 | 2743326591.03\x00


回答1:


You can use regexp_replace() function.

More details available on https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



来源:https://stackoverflow.com/questions/24513231/removing-special-characters-using-hive

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!