Failed CCA175 on 15 Sep 2018. this is why



failed the exam due to this error: “UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xxxx’ in position xxxx: ordinal not in range(128)” for PYSPARK when i trying to save my output to target HDFS location.

I performed all operations with DF/SPARKSQL then transferred back to RDD, but when trying to running yourrdd.saveAsTextFile function, this error shows up. any idea how to solve this??? Thanks…


Hi, did you face the same issue using df.write.text(“folder_path”)?



I have not tried that.

They asked for special column delimiters for textfile output, so I guess need change DF to RDD to map again?


Let’s say your DF has 3 columns (cust_id, cust_fname, cust_lname) and we are asked to use | as the delimiter then as can do as follows.“c”).selectExpr(“concat_ws(’|’, c.*) as result”).write.text(“folder_path”)


I got same error, I am sure there was some malformatted value was there which is not saving in text file


Got same error in exam. not able to save in text file.


was the source file to read from a csv format?