-
Notifications
You must be signed in to change notification settings - Fork 297
UserDefinedFunctionHandler
Anthony Virtuoso edited this page Nov 16, 2019
·
1 revision
In you choose to write custom UDFs to use in your federated queries, you must provide a Lambda function that Athena can delegate Scalar Batch Operations to.
The Athena Query Federation SDK provides a UserDefinedFunctionHandler as an abstract class that you can extend in order to implement your own UDFs. The UserDefinedFunctionHandler you extend will receive the signature of the UDF that was requested in your query and then use reflection to find the method you implemented that matches the name, input types, and return type of the UDF used in the query. This means that your can implement N UDFs in a single class / Lambda function. See athena-example for an example.