

 从补丁 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/)。

# 创建数据共享
<a name="query-editor-v2-create-datashare"></a>

您可以在要用作创建者集群的集群上创建数据共享。要详细了解数据共享的注意事项，请参阅中的《Amazon Redshift 数据库开发人员指南》**中的 [Amazon Redshift 中的数据共享注意事项](https://docs.amazonaws.cn/redshift/latest/dg/datashare-considerations.html)。

1. 选择要使用的创建者集群上的数据库。

1. 创建数据共享。例如：

   ```
   create datashare mysource;
   ```

1. 设置数据共享的权限。例如：

   ```
   grant alter, share on datashare mysource to admin;
   ```

1. 设置要共享的数据库对象的权限。例如：

   ```
   alter datashare mysource add schema public;
   ```

   ```
   alter datashare mysource add table public.event;
   ```

1. 设置使用者集群命名空间的权限以访问数据共享。例如：

   ```
   grant usage on datashare mysource to namespace '2b12345-1234-5678-9012-bb1234567890';
   ```