generalizeDate

Generalize date format.

Return "$date$" if a string is a date format; otherwise return the input string. Useful for log obfuscation.

Usage Details

select generalizeDate(column) as resultCol from table

Example

Input
table

date
2017-04-11T04:32:51Z
2017
select *, generalizeDate(date) as a resultCol from table

Output

date resultCol
2017-04-11T04:32:51Z$date$
20172017

Did this page help you?