How can I get preview of data RDD in Spark?


#1

I am relatively new to Spark and want to understand how I can quickly look at the data before coming up with the logic to process the data.

Please let me know if there are any APIs to do so…

@dgadiraju


Learn Spark 1.6.x or Spark 2.x on our state of the art big data labs

  • Click here for access to state of the art 13 node Hadoop and Spark Cluster


#2

Here are the samples to preview the data in RDD

//Getting count
rdd.count

//Getting first record
rdd.first

//Getting first few records

    rdd.
      take(10).
      foreach(println)