UDF1<String, String> formatId = new UDF1<String, String>() {
// @Override
public String call(String id) throws Exception {
return "00" + id;
}
};
// register udf in your spark session
sparskSession.udf().register("format_id", formatId, DataTypes.StringType);
while executing above code - Task Not Serializable Exceptin getting.
Please help