1 Answer
- Newest
- Most votes
- Most comments
0
Make sure to enableHiveSupport and you can directly use SparkSession.sql to execute sql.
Python example is below. Works the same in Java or Scala.
from pyspark.sql import SparkSession
spark = SparkSession.builder.appName("Test").enableHiveSupport().getOrCreate()
spark.sql("show tables").show()
answered 7 years ago
Relevant content
- asked 5 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago