Creating Hive table on top of multiple parquet files in s3

荒凉一梦 提交于 2020-01-24 20:51:07

问题


We have our dataset in s3 (parquet files) in the below format, data divided as multiple parquet files based on the row number.

data1_1000000.parquet
data1000001_2000000.parquet
data2000001_3000000.parquet
...

We have more than 2000 such files and each file has million records on it. All these files have same number of columns and structure. And one of the column has timestamp in it if we need to partition the dataset in hive. How can we point the dataset and create a single hive external table on top of it for our analysis or may be use spark for analysing it?

Thanks.


回答1:


You can simply point to the path containing the files:

CREATE EXTERNAL TABLE parquet_hive (
  foo string
) STORED AS PARQUET
LOCATION 's3://myBucket/myParquet/';


来源:https://stackoverflow.com/questions/48931063/creating-hive-table-on-top-of-multiple-parquet-files-in-s3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!