Spark 2.2 method to save as table (def saveAsTable(tableName: String): Unit) can not read and write data to same table i.e. one can not have input source table and output target table as same.
If it is done then Spark throws an exception -
Caused by: org.apache.spark.sql.AnalysisException: Cannot overwrite table XXX that is also being read from;
If it is done then Spark throws an exception -
Caused by: org.apache.spark.sql.AnalysisException: Cannot overwrite table XXX that is also being read from;
Comments
Post a Comment