

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。有关更多信息，请参阅[博客文章](https://www.amazonaws.cn/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

# 用户定义函数（UDF）的应用场景示例
UDF 的应用场景示例

**注意**  
从 2025 年 11 月 1 日起，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。从 2026 年 7 月 1 日起，Amazon Redshift 将不再支持 Python UDF。我们建议您在 2025 年 11 月 1 日之前，将现有 Python UDF 迁移到 Lambda UDF。有关创建和使用 Lambda UDF 的信息，请参阅[标量 Lambda UDF](udf-creating-a-lambda-sql-udf.md)。有关将现有 Python UDF 转换为 Lambda UDF 的信息，请参阅[博客文章](https://www.amazonaws.cn/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

通过将 Amazon Redshift 与其它组件集成，您可以使用用户定义函数来解决业务问题。以下是其它人如何在其使用案例中使用 UDF 的一些示例：
+ [使用 Amazon Redshift Lambda UDF 访问外部组件](https://www.amazonaws.cn/blogs/big-data/accessing-external-components-using-amazon-redshift-lambda-udfs/) – 介绍 Amazon Redshift Lambda UDF 的工作原理，并介绍了创建 Lambda UDF 的过程。
+ [借助 Amazon Redshift、Amazon Translate 和 Amazon Comprehend，使用 SQL 函数来翻译和分析文本](https://www.amazonaws.cn/blogs/machine-learning/translate-and-analyze-text-using-sql-functions-with-amazon-redshift-amazon-translate-and-amazon-comprehend/) – 提供预构建的 Amazon Redshift Lambda UDF，您只需点击几下即可安装这些 UDF，以便翻译、编辑和分析文本字段。
+ [使用 Amazon Redshift 访问 Amazon Location Service](https://www.amazonaws.cn/blogs/big-data/access-amazon-location-service-from-amazon-redshift/) – 介绍如何将 Amazon Redshift Lambda UDF 与 Amazon Location Service 集成。
+ [使用 Amazon Redshift 和 Protegrity 进行数据令牌化](https://www.amazonaws.cn/blogs/apn/data-tokenization-with-amazon-redshift-and-protegrity/) – 介绍如何将 Amazon Redshift Lambda UDF 与 Protegrity Serverless 产品集成。
+ [Amazon Redshift UDF](https://github.com/aws-samples/amazon-redshift-udfs) – Amazon Redshift SQL、Lambda 和 Python UDF 的集合。