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)
As others suggested, printing out entire DF is bad idea. However, you can use df.rdd.foreachPartition(f) to print out partition-by-partition without flooding driver JVM (y using collect)
df.rdd.foreachPartition(f)