插入bucketed表会产生空表

时间:2016-12-16 18:38:22

标签: hadoop hive hdfs hiveql orc

我正试图插入bucketed表。当我运行查询时,一切看起来都很好,我在报告中看到了一些写入的字节数。 Hive日志中也没有任何错误。
但当我看着桌子时,我什么都没有:(

创建表test
  test_date字符串,
  test_id字符串,
  test_title字符串,)
聚集的(
  text_date)
INTO 100 BUCKETS
ROW FORMAT DELIMITED
  FIELDS终止于' |'
  终止线由' \ n'
存储为ORC
LOCATION
  ' HDFS://myserver/data/hive/databases/test.db/test'
TBLPROPERTIES(
  ' skip.header.line.count' =' 1&#39 ;,
  '事务' =' true')

INSERT INTO test.test
SELECT' test_date',' test_id',' test_title'来自test2.green

结果
结束工作= job_148140234567_254152
将数据加载到表test.test
表test.teststats:[numFiles = 100,numRows = 1601822,totalSize = 9277056,rawDataSize = 0]
MapReduce工作推出:
Stage-Stage-1:Map:6 Reduce:100累积CPU:423.34 sec
HDFS阅读:148450105
HDFS写:9282219
成功

蜂房> select * from test.test limit 2;
OK
所用时间:0.124秒
蜂房>

1 个答案:

答案 0 :(得分:1)

这个查询真的有效吗?你在排队后有额外的逗号

test_title string,)

同样coulmn text_date不在您的列定义中。可能你的意思是test_date?

CLUSTERED BY (text_date)
相关问题