Here is a spark udf structure as an example

Def sampl_fn(x):
           Spark.sql(“select count(Id) from sample Where Id = x ”)


Spark.udf.register(“sample_fn”, sample_fn)

Spark.sql(“select id, sampl_fn(Id) from example”)

Advance Thanks for the help
-- 
k.Lakshmi Nivedita

Reply via email to