cacheTable {SparkR}R Documentation

Cache Table

Description

Caches the specified table in-memory.

Usage

cacheTable(sqlContext, tableName)

Arguments

sqlContext

SQLContext to use

tableName

The name of the table being cached

Value

DataFrame

Examples

## Not run: 
sc <- sparkR.init()
sqlContext <- sparkRSQL.init(sc)
path <- "path/to/file.json"
df <- read.json(sqlContext, path)
registerTempTable(df, "table")
cacheTable(sqlContext, "table")

## End(Not run)

[Package SparkR version 1.6.0 Index]