配置单元外部表分隔符在创建后损坏

cvxl0en2  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(337)

我有一个管道分隔符损坏的源文件。我的配置单元外部表也是用断开的管道分隔符创建的。但是在创建表之后,我看到了类似于“j”的分隔符。我也不能从表中查询。
已创建语法:
尝试使用ascii值

PARTITIONED BY ( 
  eventdate date)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY '\u00A6'   
STORED AS PARQUET

还有管子

PARTITIONED BY ( 
  eventdate date)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY '¦'   
STORED AS PARQUET

创建表后:

PARTITIONED BY (                                                           
   eventdate date)                                                             
ROW FORMAT DELIMITED                                                       
   FIELDS TERMINATED BY 'j'                                                 
STORED AS INPUTFORMAT

请帮忙就以上部分提出建议。提前多谢了。

olmpazwi

olmpazwi1#

您正在使用

PARTITIONED BY ( 
  eventdate date)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY '|'   
STORED AS PARQUET

而不是

PARTITIONED BY ( 
  eventdate date)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY '|'   
STORED AS TEXTFILE

可能是因为您告诉hive您的数据存储为parquet。如果能解决问题,请告诉我

相关问题