Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Need to access hive ACID table using spark.sql using hwc

avatar
Explorer

Hi Team i want to acees the hive ACID table using the spark.sql but when i am trying that i am just getting the table columns noit the data, now i tried using HWC but i am not sure as its showing in the docs that LLAP deamon shold be there in order to work with HWC can anyoine help me i am using spark 3.2.1 
what is the correct way to acess the hive acoid table using spark.sql ?
what are the prerequsite in order to work with HWC?
can someone share a code sniped so that i can also access the hiv acid table using spark.sql ?

spark = (
            SparkSession.builder.appName("ReadHiveTable")
            .config("hive.metastore.uris", hive_metastore_uri)
            .config("spark.sql.warehouse.dir", warehouse_dir).enableHiveSupport()
.getOrCreate()
 
df = spark.sql(f"SELECT * FROM {table_name}").show()
 
1 REPLY 1