Hive process using sensitive fields

Use regexp_replace format:

regexp_replace(address,"正则表达式","替代字符")

(1) matches all characters:

select regexp_replace(address, '.*', '***') from table;

(2) that match the specified characters:

select regexp_replace('2016-06-05', '-', '') from table;

(3) matching special characters (line breaks):

select regexp_replace(name,'\\\\n','') from table;
Published 118 original articles · won praise 25 · Views 150,000 +

Guess you like

Origin blog.csdn.net/lhxsir/article/details/90374941