2

创建了 HIVE 上下文,然后尝试使用视图创建表

Final_Data 是一个数据框。

val sqlCtx= new HiveContext(sc)
Final_Data.createOrReplaceTempView("Final_Prediction")
sqlCtx.sql("create table results as select * from Final_Prediction")

错误日志如下 -

Name: org.apache.spark.sql.AnalysisException
Message: unresolved operator 'CreateHiveTableAsSelectLogicalPlan CatalogTable(
Table: `hve1`
Created: Mon May 01 17:44:38 CDT 2017
Last Access: Wed Dec 31 17:59:59 CST 1969
Type: MANAGED
Storage(InputFormat: org.apache.hadoop.mapred.TextInputFormat, OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat)), false;;
4

0 回答 0