Hello Vinay,

Hope you are doing well.

Case class should be defined out side the main method or instead or defining main method use extends App.

In your code you have defined case class inside the main method so you are getting this error, you can use,
object CdrData extends App{}

Instead of using a main method you can only extend App try once on your side it will definitely work make sure to change the output file give a new output file. I tried executing on my side.

I hope this resolves your query.

If you face any further issue kindly revert back to us.

We will be glad assisting you.