DataFrameWriter.
insertInto
Inserts the content of the DataFrame to the specified table.
DataFrame
It requires that the schema of the DataFrame is the same as the schema of the table.
If true, overwrites existing data. Disabled by default
Notes
Unlike DataFrameWriter.saveAsTable(), DataFrameWriter.insertInto() ignores the column names and just uses position-based resolution.
DataFrameWriter.saveAsTable()
DataFrameWriter.insertInto()
New in version 1.4.