py4j.protocol.Py4JJavaError: An error occurred while calling o41.saveAsTable. this error occurred while running below code
from pyspark.sql import * if __name__ ==”__main__”: spark =SparkSession.builder.appName(“helloSpark2”).master(“local[3]”) .enableHiveSupport() .getOrCreate() df=spark.read.format(“csv”).option(“header”,”true”) .option(“inferSchema”,”true”) .load(“data/annual.csv”) spark.sql(“create database IF NOT EXISTS SK_DATABASE”) spark.catalog.setCurrentDatabase(“SK_DATABASE”) df.write.format(“csv”).mode(“overwrite”).saveAsTable(“annual_data_table”) Trying to save spark data frame as a have table, but constantly getting error I have Python 3.11 version and spark and PySpark 3.5 and py4j py4j-0.10.9.7-src. Can anyone help why this error […]