Consider a scenario where dataset ‘Ride_Details.csv’ stored in HDFS has to be processed. 

Below is the code snippet. 

Ride_details = sc.textFile("/dataset/ride.csv") # Line 1 

rd_split = Ride_details.map(lambda var1: var1.split(",")) # Line 2 

print(rd_split.take(10)) # Line 3 

File path and name provided is incorrect. In which line of code snippet, the program throws an error and what is the error message?

Error in Line 1, InvalidInputException

Error in Line 2, InvalidInputException

Error in Line 3, InvalidInputException:

Error in Line 3, rd_split is not defined

Verified Answer
Correct Option - c

To get all Infosys Certified PySpark Professional Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram