I am using delta format to save the logs into a table as below. df.write.format("delta").mode("append").saveAsTable("table_name")