How Do I Rectify the Exception Occurred When I Perform an Operation on the Table Named table?
Question
After a table named table is created, the following error message is displayed when you run drop table table or perform other operations.
16/07/12 18:56:29 ERROR SparkSQLDriver: Failed in [drop table table] java.lang.RuntimeException: [1.1] failure: identifier expected table ^ at scala.sys.package$.error(package.scala:27) at org.apache.spark.sql.catalyst.SqlParserTrait$class.parseTableIdentifier(SqlParser.scala:56) at org.apache.spark.sql.catalyst.SqlParser$.parseTableIdentifier(SqlParser.scala:485)
Answer
table is a keyword of Spark SQL and cannot be used as a table name. Do not name a table table.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.