我试图执行这些spark语句,但它不起作用
spark.sql("CREATE OR REPLACE GLOBAL TEMPORARY VIEW VIEW_1
AS SELECT * from orc.`/apps/hive/warehouse/userdb.db/rib_ies_liensserveurs`")
spark.sql("CREATE OR REPLACE GLOBAL TEMPORARY VIEW VIEW_2 AS SELECT * from VIEW_1")
spark.sql("SELECT * from VIEW_2").show()
这将失败,以下错误 -
找不到表或查看:view_1
为什么您将数据注册为GLOBAL TEMPORARY VIEW
尝试仅使用TEMPORARY VIEW
全局温度视图通过不同的会话共享数据