read.json {SparkR} | R Documentation |
Loads a JSON file (one object per line), returning the result as a DataFrame It goes through the entire dataset once to determine the schema.
read.json(sqlContext, path) jsonFile(sqlContext, path)
sqlContext |
SQLContext to use |
path |
Path of file to read. A vector of multiple paths is allowed. |
DataFrame
## Not run:
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D path <- "path/to/file.json"
##D df <- read.json(sqlContext, path)
##D df <- jsonFile(sqlContext, path)
## End(Not run)