Create a Hive table for reading parquet files from the parquet scheme / avro

We are looking for a solution to create an external hive table for reading data from parquet files in accordance with the parquet / avro scheme.

in another way, how to create a beehive table from a parquet / avro scheme?

thanks:)

+1
source share
1 answer

Try using the avro scheme:

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'; 

The same request is given. Dynamically create an external Hive table using the Avro scheme in parquet data

+9
source

Source: https://habr.com/ru/post/1238334/


All Articles