Hi @Gaurav Rupnarโ , I have Spark SQL UDFs (implemented as Scala methods) in which I want to get the details of the Spark SQL query that called the UDF, especially a unique query ID, which in SparkSQL is the Spark Job ID. That's why I wanted a way to detect the Job ID from the UDF code itself when it is executed on the Executors as Tasks.
A logic in my UDF requires this unique query id (Job ID) to enforce that the UDF execution(s) will be consistent for each SparkSQL query.