tableToDF {SparkR}R Documentation

Create a SparkDataFrame from a SparkSQL Table

Description

Returns the specified Table as a SparkDataFrame. The Table must have already been registered in the SparkSession.

Usage

tableToDF(tableName)

Arguments

tableName

The SparkSQL Table to convert to a SparkDataFrame.

Value

SparkDataFrame

Note

tableToDF since 2.0.0

Examples

## Not run: 
##D sparkR.session()
##D path <- "path/to/file.json"
##D df <- read.json(path)
##D createOrReplaceTempView(df, "table")
##D new_df <- tableToDF("table")
## End(Not run)

[Package SparkR version 2.0.2 Index]