Data Frames : Reading TextFile

Hello All ,

How to read a textFile using Spark dataframe ?

I have tried orderDF = sqlContext.read.text("/user/cloudera/Amit/Orders") but it was throwing error.

Anyone please help me on this.

Regards ,
Amit

Can you share the error you were getting?

More info. And you want to try sql.read.load(…) and see what that gets but you need to include the top of your stack trace. You do not need to post the entire trace. “Orders” does not look like a file name. What is it?