How to create method in spark java that returns Dataset<Row>

Viewed 20

I am trying to create method in java spark which will take some arguments and return Dataset as output then this method's output I will use in another method so that my code will be modularize but when I tried to create below method it gives error as ; expected.

exa- public static Dataset<Row> readData(String x, String y) { //Some Code };

Kindly guide how to create methods/functions like we can create in scala spark and make our code modularize and reusable.

0 Answers
Related