Re: How to Register Permanent User-Defined-Functions (UDFs) in SparkSQL

2016-07-12 Thread Daniel Darabos
Hi Lokesh, There is no way to do that. SqlContext.newSession documentation says: Returns a SQLContext as new session, with separated SQL configurations, temporary tables, registered functions, but sharing the same SparkContext, CacheManager, SQLListener and SQLTab. You have two options:

How to Register Permanent User-Defined-Functions (UDFs) in SparkSQL

2016-07-10 Thread Lokesh Yadav
Hi with sqlContext we can register a UDF like this: sqlContext.udf.register("sample_fn", sample_fn _ ) But this UDF is limited to that particular sqlContext only. I wish to make the registration persistent, so that I can access the same UDF in any subsequent sqlcontext. Or is there any other way