Details
-
New Feature
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Receiving some requirements on encryption recently but hive is not supporting it. Before the full implementation via HIVE-8065, this might be useful for some cases.
hive> create table encode_test(id int, name STRING, phone STRING, address STRING) > ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' > WITH SERDEPROPERTIES ('column.encode.columns'='phone,address', 'column.encode.classname'='org.apache.hadoop.hive.serde2.Base64WriteOnly') STORED AS TEXTFILE; OK Time taken: 0.584 seconds hive> insert into table encode_test select 100,'navis','010-0000-0000','Seoul, Seocho' from src tablesample (1 rows); ...... OK Time taken: 5.121 seconds hive> select * from encode_test; OK 100 navis MDEwLTAwMDAtMDAwMA== U2VvdWwsIFNlb2Nobw== Time taken: 0.078 seconds, Fetched: 1 row(s) hive>