insertInto,DataFrame,character-method {SparkR}R Documentation

insertInto

Description

Insert the contents of a DataFrame into a table registered in the current SQL Context.

Usage

## S4 method for signature 'DataFrame,character'
insertInto(x, tableName, overwrite = FALSE)

insertInto(x, tableName, ...)

Arguments

x

A SparkSQL DataFrame

tableName

A character vector containing the name of the table

overwrite

A logical argument indicating whether or not to overwrite the existing rows in the table.

Examples

## Not run: 
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D df <- read.df(sqlContext, path, "parquet")
##D df2 <- read.df(sqlContext, path2, "parquet")
##D registerTempTable(df, "table1")
##D insertInto(df2, "table1", overwrite = TRUE)
## End(Not run)

[Package SparkR version 1.4.1 Index]