spark SQL里面出现mismatched input ‘lg

spark SQL里面出现mismatched input ‘lg,第1张

spark SQL里面出现mismatched input ‘lg mismatched input ‘lg_edu_warehouse’ expecting {, ‘;’}问题解决 1、报错信息

== SQL ==
select lastedittime form lg_edu_warehouse.dwd_student_allinfo_day_detailwhere dataflag=0

at org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:266)
at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:133)
at org.apache.spark.sql.execution.SparkSqlParser.parse(SparkSqlParser.scala:48)
at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:81)
at org.apache.spark.sql.SparkSession.$anonfun$sql(SparkSession.scala:604)
at org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:111)
at org.apache.spark.sql.SparkSession.$anonfun$sql(SparkSession.scala:604)
at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:763)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:601)
at StudentPrediectEveryday.EveryDayPrediect$.everyDayPrediect(EveryDayPrediect.scala:306)
at StudentPrediectEveryday.EveryDayPrediect$.main(EveryDayPrediect.scala:267)
at StudentPrediectEveryday.EveryDayPrediect.main(EveryDayPrediect.scala)

找到原因后,发现是from写错了,写成了form。但是SQL是不会将form报错的,所以需要仔细观察

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5442810.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-11
下一篇 2022-12-11

发表评论

登录后才能评论

评论列表(0条)

保存