insertInto {SparkR} | R Documentation |
Insert the contents of a SparkDataFrame into a table registered in the current SQL Context.
insertInto(x, tableName, ...) ## S4 method for signature 'SparkDataFrame,character' insertInto(x, tableName, overwrite = FALSE)
x |
A SparkDataFrame |
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. |
Other SparkDataFrame functions: SparkDataFrame-class
,
[[
, agg
,
arrange
, as.data.frame
,
attach
, cache
,
collect
, colnames
,
coltypes
, columns
,
count
, dapply
,
describe
, dim
,
distinct
, dropDuplicates
,
dropna
, drop
,
dtypes
, except
,
explain
, filter
,
first
, group_by
,
head
, histogram
,
intersect
, isLocal
,
join
, limit
,
merge
, mutate
,
ncol
, persist
,
printSchema
,
registerTempTable
, rename
,
repartition
, sample
,
saveAsTable
, selectExpr
,
select
, showDF
,
show
, str
,
take
, unionAll
,
unpersist
, withColumn
,
write.df
, write.jdbc
,
write.json
, write.parquet
,
write.text
## 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)