Hive函数用于替换列值中的逗号

Mad*_*ava 3 hive hiveql

我有一个hive表,其String列的值为12,345.有没有什么方法可以在这个hive表中插入时删除逗号的hive函数?

dim*_*mah 5

您可以使用regexp_replace(string INITIAL_STRING, string PATTERN, string REPLACEMENT)哪个是Hive中的函数.

因此,如果要将包含逗号的表中的数据移动到新表,您将使用:
insert into table NEW select regexp_replace(commaColumn,',','') from OLD;