首页 > 解决方案 > 无法在 SPARK 数据帧上创建临时视图

问题描述

这是示例代码

spark-shell --master yarn 
val hive_location = "hive_meta_loc"
val spark =org.apache.spark.sql.SparkSession.builder().appName("WNGDEVICES").config("spark.sql.warehouse.dir", "hive_location").enableHiveSupport().getOrCreate()  
val rawdata = spark.sql("SELECT *  from <table name>") 
rawdata.createOrReplaceTempView("Rawdata")

当我执行此操作时,我收到以下错误

错误快照

标签: apache-spark

解决方案


推荐阅读