HIVE函式集合(全)
阿新 • • 發佈:2018-12-12
示例:
mask(ccn)
mask(ccn,'X','x','0')
mask(ccn,'x','x','x')
引數:
mask(value,upperChar, lowerChar,digitChar,otherChar,numberChar,dayValue,monthValue,yearValue)
value - 要遮蔽的值。支援的型別:TINYINT,SMALLINT,INT,BIGINT,STRING,VARCHAR,CHAR,DATE
upperChar - 用大寫字元替換大寫字元的字元。指定-1以保留原始字元。預設值:'
X'lowerChar - 用小寫替換小寫字元的字元。指定-1以保留原始字元。預設值:'x'
digitChar - 用數字字元替換的字元。指定-1以保留原始字元。預設值:'
n'otherChar - 用其替換所有其他字元的字元。指定-1以保留原始字元。預設值:-1
numberChar - 用數字替換數字的字元。有效值:0-9。預設值:'
1'dayValue - 用日期替換日期欄位的值。指定-1以保留原始值。有效值:1-31。預設值:1
monthValue - 用日期替換日期中的月份欄位的值。指定-1以保留原始值。有效值:0-11。預設值:0
yearValue - 用日期替換年份欄位的值。指定-1以保留原始值。預設值:0