You can load a DAT file into a dataframe using the below command:
val sqlContext = sqlContext.read.format("csv").option("delimiter","|").load("emp_pipeline.DAT)
Hope this helps!
To know more about Spark Scala, It's recommended to join Spark training online today.
Thanks!!