Spark First FunctionIn Spark, the First function always returns the first element of the dataset. It is similar to take(1). Example of First functionIn this example, we retrieve the first element of the dataset.
Here, we got the desired output. Next TopicSpark Take Function |