pyspark.sql.DataFrameWriter.insertInto¶
-
DataFrameWriter.insertInto(tableName, overwrite=None)[source]¶ Inserts the content of the
DataFrameto the specified table.It requires that the schema of the
DataFrameis the same as the schema of the table.- Parameters
- overwritebool, optional
If true, overwrites existing data. Disabled by default
Notes
Unlike
DataFrameWriter.saveAsTable(),DataFrameWriter.insertInto()ignores the column names and just uses position-based resolution.New in version 1.4.