Skip to contents

Inserts a Spark DataFrame into a Spark table

Usage

spark_insert_table(
  x,
  name,
  mode = NULL,
  overwrite = FALSE,
  options = list(),
  ...
)

Arguments

x

A Spark DataFrame or dplyr operation

name

The name to assign to the newly generated table.

mode

A character element. Specifies the behavior when data or table already exists. Supported values include: 'error', 'append', 'overwrite' and ignore. Notice that 'overwrite' will also change the column structure.

For more details see also https://spark.apache.org/docs/latest/sql-programming-guide.html#save-modes for your version of Spark.

overwrite

Boolean; overwrite the table with the given name if it already exists?

options

A list of strings with additional options.

...

Optional arguments; currently unused.