Hive function to replace comma in column value

我只是一个虾纸丫 提交于 2019-12-05 21:23:14

You can use regexp_replace(string INITIAL_STRING, string PATTERN, string REPLACEMENT) which is a function in Hive.

So if you are moving the data from a table that contains the comma to a new table you will use :
insert into table NEW select regexp_replace(commaColumn,',','') from OLD;

Harikrishnan Ck

Hive does have split function. which can be used here. split and concat to achieve the desired result You may refer this question. Does Hive have a String split function?

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