SparkR OCR file read

47 views
Skip to first unread message

armen donigian

unread,
Nov 7, 2015, 9:13:38 PM11/7/15
to SparkR Developers
How would you load an OCR formatted file in SparkR? 

For example, here's the scala equivalent: 
scala> val blah = sqlContext.read.format("orc").load(filename)

Sebastian YEPES

unread,
Dec 7, 2015, 7:06:13 AM12/7/15
to SparkR Developers
You need to create a Hive context to read ORC files:

hiveContext <- sparkRHive.init(sc)
d <- read.df(hiveContext, "/user/spark/data.orc", "orc")
printSchema(d)
Reply all
Reply to author
Forward
0 new messages