saveAsParquetFile {SparkR} | R Documentation |
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().
## S4 method for signature 'DataFrame,character' saveAsParquetFile(x, path) saveAsParquetFile(x, path)
x |
A SparkSQL DataFrame |
path |
The directory where the file is saved |
## 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)