【发布时间】:2019-10-07 07:32:16
【问题描述】:
我在 hive 中创建了一个嵌套的分区表。 但是我不知道如何往表中插入数据。
我试过了 插入覆盖表方法。
在蜂巢中,
create external table accounts_nested(
first_name string, last_name string, zipcode string)
partitioned by (state string, areacode string)
row format delimited
fields terminated by ','
location '/loudacre/accounts_nested';
然后,
insert overwrite table accounts_nested(
partition(areacode)
select first_name, last_name, zipcode, state, areacode from accounts;
我在终端上看不到任何错误,但我看不到我插入的数据。
我想查看 accounts_nested 表中的数据。
【问题讨论】: