You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
two points to note from considerations/limitations list and some discussion
Java runtime support – Currently, Athena UDFs support the Java 8 and Java 11 runtimes for Lambda. This is great because very easily can use the same Java functionality from Apache Commons text processing library used in the Scala JAR we use. However as an initial Minimum Viable working product, Lambdas can be created via Python as well.
Scalar UDFs only – Athena only supports scalar UDFs, which process one row at a time and return a single column value.
In our case we can just basically create a derived column with the text from both columns separated by a specific separator
(eg ####). Then the Lambda function can separate them and do the processing and output a single value
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So a probable mechanism of adding UDFs in Athena is through creating appropriate AWS Lambda functions
https://docs.aws.amazon.com/athena/latest/ug/querying-udf.html
two points to note from considerations/limitations list and some discussion
Java runtime support – Currently, Athena UDFs support the Java 8 and Java 11 runtimes for Lambda.
This is great because very easily can use the same Java functionality from Apache Commons text processing library used in the Scala JAR we use. However as an initial Minimum Viable working product, Lambdas can be created via Python as well.Scalar UDFs only – Athena only supports scalar UDFs, which process one row at a time and return a single column value.
In our case we can just basically create a derived column with the text from both columns separated by a specific separator
(eg ####). Then the Lambda function can separate them and do the processing and output a single value
Beta Was this translation helpful? Give feedback.
All reactions