Skip to contents

Registers a SparkDataFrame as a Temporary Table in the SparkSession

Usage

registerTempTable(x, tableName)

# S4 method for 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) {
sparkR.session()
path <- "path/to/file.json"
df <- read.json(path)
registerTempTable(df, "json_df")
new_df <- sql("SELECT * FROM json_df")
}