【问题标题】:ORC Hive Create Table errors with locationORC Hive 创建表的位置错误
【发布时间】:2015-10-22 00:25:21
【问题描述】:

当我尝试创建外部 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)>

【问题讨论】:

    标签: hadoop hive orc


    【解决方案1】:

    您好,请尝试以下创建语句。它对我有用:)

    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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-25
      • 1970-01-01
      • 2014-02-16
      • 1970-01-01
      • 2016-07-27
      • 1970-01-01
      • 2018-04-03
      • 2020-09-13
      相关资源
      最近更新 更多