SparkR (version 2.1.2)

cacheTable: Cache Table

Description

Caches the specified table in-memory.

Usage

# S3 method for default
cacheTable(tableName)

Arguments

tableName

The name of the table being cached

Value

SparkDataFrame

Examples

Run this code
# NOT RUN {
sparkR.session()
path <- "path/to/file.json"
df <- read.json(path)
createOrReplaceTempView(df, "table")
cacheTable("table")
# }

Run the code above in your browser using DataCamp Workspace