registerTempTable {SparkR} | R Documentation |
Registers a DataFrame as a Temporary Table in the SQLContext
## S4 method for signature 'DataFrame,character' registerTempTable(x, tableName) registerTempTable(x, tableName)
x |
A SparkSQL DataFrame |
tableName |
A character vector containing the name of the table |
## Not run:
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D path <- "path/to/file.json"
##D df <- jsonFile(sqlContext, path)
##D registerTempTable(df, "json_df")
##D new_df <- sql(sqlContext, "SELECT * FROM json_df")
## End(Not run)