Create Hive table to read parquet files from parqu

2019-01-18 08:16发布

We are looking for a solution in order to create an external hive table to read data from parquet files according to a parquet/avro schema.

in other way, how to generate a hive table from a parquet/avro schema ?

thanks :)

1条回答
Deceive 欺骗
2楼-- · 2019-01-18 08:32

Try below using avro schema:

CREATE TABLE avro_test ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' STORED AS AVRO TBLPROPERTIES ('avro.schema.url'='myHost/myAvroSchema.avsc'); 

CREATE EXTERNAL TABLE parquet_test LIKE avro_test STORED AS PARQUET LOCATION 'hdfs://myParquetFilesPath';

Same query is asked in Dynamically create Hive external table with Avro schema on Parquet Data

查看更多
登录 后发表回答