read.json {SparkR}R Documentation

Create a SparkDataFrame from a JSON file.

Description

Loads a JSON file, returning the result as a SparkDataFrame By default, (JSON Lines text format or newline-delimited JSON ) is supported. For JSON (one record per file), set a named property multiLine to TRUE. It goes through the entire dataset once to determine the schema.

Usage

read.json(path, ...)

Arguments

path

Path of file to read. A vector of multiple paths is allowed.

...

additional external data source specific named properties.

Value

SparkDataFrame

Note

read.json since 1.6.0

Examples

## Not run: 
##D sparkR.session()
##D path <- "path/to/file.json"
##D df <- read.json(path)
##D df <- read.json(path, multiLine = TRUE)
## End(Not run)

[Package SparkR version 3.0.0 Index]