Description Usage Arguments Note See Also Examples
Registers a SparkDataFrame as a Temporary Table in the SparkSession
1 2 3 4 | registerTempTable(x, tableName)
## S4 method for signature 'SparkDataFrame,character'
registerTempTable(x, tableName)
|
x |
A SparkDataFrame |
tableName |
A character vector containing the name of the table |
registerTempTable since 1.4.0
createOrReplaceTempView
1 2 3 4 5 6 7 8 | ## Not run:
sparkR.session()
path <- "path/to/file.json"
df <- read.json(path)
registerTempTable(df, "json_df")
new_df <- sql("SELECT * FROM json_df")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.