Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (6.5k points)

Can anyone tell me how to read unstructured data in Spark?

1 Answer

0 votes
by (11.3k points)

You can simply perform the following read operation to convert your unstructured data into a Spark RDD:

val rd = sc.textFile("location-of-data")

The above statement would create an RDD, which can further be transformed according to the use case.

Note: 'sc' is the Spark Context variable

If you are looking for an online course to learn Spark, I recommend this Spark Certification program by Intellipaat.

Browse Categories

...