Spark Scenario based Interview Questions with Answers – 2
Q.1 There is a json file with following content :- {“dept_id”:101,”e_id”:[10101,10102,10103]} {“dept_id”:102,”e_id”:[10201,10202]} And data is loaded into spark dataframe say mydf, having below dtypes dept_id: bigint, e_id: array<bigint> What will be the best way to get the e_id individually with dept_id ? Answer : we can use the explode functionRead More →