tableToDF {SparkR} | R Documentation |
Returns the specified Table as a SparkDataFrame. The Table must have already been registered in the SQLContext.
tableToDF(sqlContext, tableName)
sqlContext |
SQLContext to use |
tableName |
The SparkSQL Table to convert to a SparkDataFrame. |
SparkDataFrame
## Not run:
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D path <- "path/to/file.json"
##D df <- read.json(sqlContext, path)
##D registerTempTable(df, "table")
##D new_df <- tableToDF(sqlContext, "table")
## End(Not run)