saveAsParquetFile,DataFrame,character-method {SparkR}R Documentation

saveAsParquetFile

Description

Save the contents of a DataFrame as a Parquet file, preserving the schema. Files written out with this method can be read back in as a DataFrame using parquetFile().

Usage

## S4 method for signature 'DataFrame,character'
saveAsParquetFile(x, path)

saveAsParquetFile(x, path)

Arguments

x

A SparkSQL DataFrame

path

The directory where the file is saved

Examples

## Not run: 
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D path <- "path/to/file.json"
##D df <- jsonFile(sqlContext, path)
##D saveAsParquetFile(df, "/tmp/sparkr-tmp/")
## End(Not run)

[Package SparkR version 1.4.0 Index]