Spark Data Frame using Case class

Creating Case Class called Employee

Genarating EmployeesData using Case class

You can generate the Test Data using case class and Seq()

Converting EmployeesData to Data Frame

Using PrintSchema to see the Data frame schema.

Show Data in Data Frame