-werners-
Esteemed Contributor III

you want to make sure the Spark framework is used, and not just plain python/scala.

So a UDF is the way to go.