Skip to contents

Registers a SparkDataFrame as a Temporary Table in the SparkSession

Usage

registerTempTable(x, tableName)

# S4 method for class 'SparkDataFrame,character'
registerTempTable(x, tableName)

Arguments

x

A SparkDataFrame

tableName

A character vector containing the name of the table

Note

registerTempTable since 1.4.0

Examples

if (FALSE) { # \dontrun{
sparkR.session()
path <- "path/to/file.json"
df <- read.json(path)
registerTempTable(df, "json_df")
new_df <- sql("SELECT * FROM json_df")
} # }