How to pass variable arguments to the Cube function in spark sql and also agg function of the cube?
I have a list of columns, and I want to find the cube function on the columns and also aggerations function.
For example:
val columnsInsideCube = List("data", "product","country")
val aggColumns = List("revenue")
I want something like this:
dataFrame.cube(columns:String*).agg(aggcolumns:String*)
This is not like passing scala array to the Cube. Cube is predefined class in the datafram.we have to send it in a proper manner.