Scala StructType

Step 1: Creating the Scala StructType to hold the data that are read from the text file.

Step 2:  Read the text file data using Spark Context.

Step 3: Splitting the Data with \t and   Assigning the Data to StructType

Step 4: Create the Data Frame and Register the Data frame to Temp table.

Step 5:  Join the Employee temp table with Order table from Hive.

Step 6:  Store the Results to CSV

Complete Spark Scala Program to construct StructType and Joining the data with another Dataframe.