简体   繁体   English

蜂巢中的镶木地板

[英]parquet in Hive

I am learning how to use Hive with the Hortonwork Sandbox, however whenever I am not able to.我正在学习如何将 Hive 与 Hortonwork Sandbox 一起使用,但是每当我做不到的时候。 When I create a table, the data is not shown, so I decided to add this query:当我创建一个表时,没有显示数据,所以我决定添加这个查询:

Create external table tripinfo (
  VendorID string,
  pickup string,
  dropoff string,
  Passenger string,
  distance string,
  Pickloc string,
  droploc string,
  rate string,
  store string,
  payment string,
  amount string,
  extra string,
  tax string,
  improvement string,
  tip string,
  tolls string,
  tap string)
row format serde "parquet.hive.serde.PaquetHiveSerDe"
stored as 
INPUTFORMAT "parquet.hive.DeprecatedParquetInputFormat"
OUTPUTFORMAT "parquet.hive.DeprecatedParquetOutputFormat"
Location "/user/taxi/yellow data/trip/";

however, it shows this error: Error while compiling statement: FAILED: SemanticException Cannot find class 'parquet.hive.DeprecatedParquetInputFormat'但是,它显示此错误: Error while compiling statement: FAILED: SemanticException Cannot find class 'parquet.hive.DeprecatedParquetInputFormat'

the parquet file is already in HDFS, separated by " " and is huge (as you might have expected) Am I doing something wrong, or is ther any way to create a table with parquet data? parquet 文件已经在 HDFS 中,用 " " 分隔并且很大(正如您所料)我做错了什么,或者有什么方法可以创建一个包含 parquet 数据的表?

I assume you are reading this page?我假设您正在阅读此页面? - https://cwiki.apache.org/confluence/display/Hive/Parquet - https://cwiki.apache.org/confluence/display/Hive/Parquet

Notice the header Hive 0.10-0.12 .注意标题Hive 0.10-0.12 The sandbox should at least be using Hive 1.x, maybe even 2.x, so you should just use a query like so沙箱至少应该使用 Hive 1.x,甚至可能是 2.x,所以你应该只使用这样的查询

CREATE EXTERNAL TABLE name (
...
) 
STORED AS PARQUET
LOCATION "___";

Binary data in parquet files shouldn't separated by ASCII spaces unless you are referring to a single string-type column. parquet 文件中的二进制数据不应由 ASCII 空格分隔,除非您指的是单个字符串类型的列。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM