Error when saveAsTable with appending but not overwriting

Appending to hive table gives an error but overwriting works why? error org.apache.spark.sql.AnalysisException: Inserting into an RDD-based table is not allowed
When i do

dfTrimmed.write.mode("overwrite").saveAsTable("table") it worksbut this 

dfTrimmed.write.mode("append").saveAsTable("table") gives an error

error org.apache.spark.sql.AnalysisException: Inserting into an RDD-based table is not allowed

I am not sure why this is I am using spark 1.6.

I am inserting into a hive table while my dataframe was created through a hiveContext.

Thank you