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]
You can download hive-site.xml from CM, by going to Your Cluster > Hive > Download Client Configuration:
Save your configuration, and restart your interpreter.
Step 4: Code away
Here is a simple example of Spark reading from a CSV and writing to a Hive table using HWC:
Read raw location data
val locationDf = spark.read.options(Map("inferSchema"->"true","delimiter"->",","header"->"true")).csv("s3a://viz-cdp-bucket/raw/locations.csv") locationDf.printSchema()
Setup HWC session
import com.hortonworks.hwc.HiveWarehouseSession import com.hortonworks.hwc.HiveWarehouseSession._ val hive = HiveWarehouseSession.session(spark).build()