I understand we can solve this in multiple ways. I am trying to solve this Question. Hence i am following the flow.
Write the missing Spark SQL queries to join all the three tables, sort the table, and display the output in the given format: ID, Name, Salary, Manager Name.
Instructions:
1. Table Names are highlighted in the following queries
Spark sql
val manager = sc.textFile("/user/EmployeeManagers")
val managerRDD = manager.map(x => (x.split(",")(0), x.split(",")(1)))
val name = sc.textFile("/user/EmployeeNames")
val namePairRDD = name.map(x => (x.split(",")(0), x.split(",")(1)))
val salary = sc.textFile("/user/EmployeeSalary")
val salaryPairRDD = salary.map(x => (x.split(",")(0), x.split(",")(1)))
<Write your code>