【发布时间】:2021-01-07 08:33:04
【问题描述】:
我正在尝试使用 spark.sql 从配置单元视图中获取 pyspark 中的一些数据,但每次它都会抛出以下错误:
pyspark.sql.utils.AnalysisException: u"Undefined function: 'from_timestamp'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.;
我在 SparkSession.builder 上的设置如下:
spark = SparkSession.builder.appName("home_office") \
.config("hive.exec.dynamic.partition", "true") \
.config("hive.exec.dynamic.partition.mode", "nonstrict") \
.config("hive.exec.compress.output=false", "false") \
.config("spark.unsafe.sorter.spill.read.ahead.enabled", "false") \
.config("spark.debug.maxToStringFields", 1000)\
.enableHiveSupport() \
.getOrCreate()
【问题讨论】:
标签: apache-spark pyspark hive apache-spark-sql