ORC Hive Create Table errors with location



当我尝试创建外部ORC表并提供位置时,我得到下面的错误。这个错误似乎与tblproperties有关。如果取出tblproperties并运行它,它运行良好。然而,我必须使用alter table命令来更新tblproperties为SNAPPY。有人面临类似的问题吗?我不确定是否有一个JIRA打开,如果它的bug在蜂巢。任何意见都很感谢。谢谢。

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)>

试试下面的create语句。它对我有效:)

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

注意 tblproperties是LOCATION

后的最后一行

相关内容

  • 没有找到相关文章

最新更新