read.json {SparkR}R Documentation

Create a SparkDataFrame from a JSON file.

Description

Loads a JSON file (one object per line), returning the result as a SparkDataFrame It goes through the entire dataset once to determine the schema.

Usage

## Default S3 method:
read.json(path)

## Default S3 method:
jsonFile(path)

Arguments

path

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

Value

SparkDataFrame

Note

read.json since 1.6.0

jsonFile since 1.4.0

Examples

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

[Package SparkR version 2.0.2 Index]