Closed rollingdeep closed 1 year ago
use execute instead of executeQuery (limit is not working for this method).
use execute instead of executeQuery (limit is not working for this method).
It works up to 1000 lines. If you need more lines, you need to use executeQuery(), which does not work properly with LIMIT...
I found a solution to visit hive external tables(ACID tables not support) for spark. First, remove spark-llap jar. Second, copy the create table clause from hive, then create table in spark-sql. In short, create same schema in spark-sql which point to the same hdfs location. Partition tables need add partitoin manually. Third, you can use spark.sql() and spark.write.orc*() without the limit of spark-llap.
Warning, You need to add partition using bash or hql script on hive partition table to ensure the same schema on both hive and spark.
just try it in spark-shell 2.3.2.
god, any help?