I would like to display the entire Apache Spark SQL DataFrame with the Scala API. I can use the show() method:
show()
myDataFrame.show(Int.MaxValue)
One way is using count() function to get the total number of records and use show(rdd.count()) .
count()
show(rdd.count())