Chapter 13: Athena UDFs and ML
In this chapter, we will continue with the theme of enhancing Athena with our functionality by adding user-defined functions (UDFs) using AWS Lambda and AWS SageMaker. In Chapter 3, Key Features, Query Types, and Functions, we introduced the built-in functions that are available to you as a user of Athena. But as you build out your data lake and your Athena usage becomes more targeted at specific use cases, you may encounter situations where the built-in functions do not provide the exact functionality that you require. For such scenarios, Athena supports UDFs.
In this chapter, we are going to cover the basics of UDFs and how to create them. By the end, we will learn how we can apply UDFs to non-standard use cases and also to perform machine learning analysis on our data.
In this chapter, we will cover the following topics:
- What are UDFs?
- Writing, deploying, and using UDFs
- Using built-in machine learning UDFs