Concept Flow - UDFs (User Defined Functions)
Define UDF function
Register UDF with Spark
Apply UDF to DataFrame column
Spark runs UDF on each row
New column with UDF results
Show or use transformed DataFrame
You first write a function, then tell Spark about it as a UDF. Spark applies it to each row, creating a new column with results.