简体   繁体   中英

Reading Partitioned HIVE table in SPARK SQL

I am trying to read the HIVE table has 2 years of data and it is partitioned on day, Reading it through SPARK-SQL takes more than 10 mins even after filter applied for 6 months data.

Any idea how to improve, i have tried with DISTRIBUTE BY clause in Hive QL

You can enable partitioning pruning by setting property:

spark.sql.hive.metastorePartitionPruning=true

This will filter the partitions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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