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