blob: 0f9db027e461c5453dce7b77dbaff30a7f980906 [file] [log] [blame]
drop table if exists table_with_utf8_encoding;
create table table_with_utf8_encoding (name STRING)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES ('serialization.encoding'='utf-8');
load data local inpath '../../data/files/encoding-utf8.txt' overwrite into table table_with_utf8_encoding;
select * from table_with_utf8_encoding;
drop table if exists table_with_non_utf8_encoding;
create table table_with_non_utf8_encoding (name STRING)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES ('serialization.encoding'='ISO8859_1');
insert overwrite table table_with_non_utf8_encoding select name from table_with_utf8_encoding;
select * from table_with_non_utf8_encoding;