【发布时间】:2015-01-06 17:43:02
【问题描述】:
在查询存储为 Sequencefile 格式的表时,我在 Hive 表中看到的二进制数据存在问题。
我使用 Sqoop 从 Databse 导入数据,指定以下选项:
--as-sequencefile --fields-terminated-by '\001' --null-string '\\N' --null-non-string '
创建了一个 Hive 外部表来指向我导入数据库数据的位置:
CREATE EXTERNAL TABLE if not exists Test(
test_id string,
s_date timestamp)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\001'
STORED AS sequencefile
LOCATION '<location where i importedsqoop data>
我在想我的 Hive tabe 会反序列化数据并以可读格式显示数据,但我将数据视为二进制或不可读格式。
是否需要执行更多步骤才能使 hive 反序列化数据?
谢谢。尼什。
【问题讨论】: