Hi,

sqlContext.udf.register("udfname", functionname _)

example:

def square(x:Int):Int = { x * x}

register udf as below

sqlContext.udf.register("square",square _)

Thanks,
Vishnu

On Wed, Jul 8, 2015 at 2:23 PM, vinod kumar <vinodsachin...@gmail.com>
wrote:

> Hi Everyone,
>
> I am new to spark.may I know how to define and use User Define Function in
> SPARK SQL.
>
> I want to use defined UDF by using sql queries.
>
> My Environment
> Windows 8
> spark 1.3.1
>
> Warm Regards,
> Vinod
>
>
>

Reply via email to