table {SparkR}R Documentation

Create a DataFrame from a SparkSQL Table

Description

Returns the specified Table as a DataFrame. The Table must have already been registered in the SQLContext.

Usage

table(sqlContext, tableName)

Arguments

sqlContext

SQLContext to use

tableName

The SparkSQL Table to convert to a DataFrame.

Value

DataFrame

Examples

## 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, "table")
##D new_df <- table(sqlContext, "table")
## End(Not run)

[Package SparkR version 1.4.0 Index]