1

当我尝试创建外部 ORC 表并提供位置时,出现以下错误。该错误似乎与tblproperties. 如果取出tblproperties并运行它,它运行良好。但是,我将不得不使用 alter table 命令将其更新tblproperties为 SNAPPY。有没有人面临类似的问题?我不确定是否打开了 JIRA,如果它的错误在蜂巢中。任何输入表示赞赏。谢谢。

hive (default)> create external table Addresses (
              >   name string,
              >   street string,
              >   city string,
              >   state string,
              >   zip int
              > ) stored as orc tblproperties ("orc.compress"="SNAPPY")
              > LOCATION '/user/abc/address_orc';
FAILED: ParseException line 8:0 missing EOF at 'LOCATION' near ')'
hive (default)>
4

1 回答 1

5

嗨,试试下面的创建语句。它对我有用:)

hive (vijay)>
            >  create external table Addresses (
            >   name string,
            >   street string,
            >   city string,
            >   state string,
            >   zip int
            >  ) stored as orc
            >  LOCATION '/user/vijay/address_orc'
            > tblproperties ("orc.compress"="SNAPPY");
OK
Time taken: 0.212 seconds
hive (vijay)> describe Addresses;
OK
# col_name              data_type               comment

name                    string                  from deserializer
street                  string                  from deserializer
city                    string                  from deserializer
state                   string                  from deserializer
zip                     int                     from deserializer

注意在 LOCATION 之后的最后一行提到的 tblproperties

于 2015-07-31T10:01:40.397 回答