

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

# SVV\_EXTERNAL\_TABLES
<a name="r_SVV_EXTERNAL_TABLES"></a>

使用 SVV\_EXTERNAL\_TABLES 可查看外部表的详细信息；有关更多信息，请参阅[CREATE EXTERNAL SCHEMA](r_CREATE_EXTERNAL_SCHEMA.md)。对于跨数据库查询，也可以使用 SVV\_EXTERNAL\_TABLES 来查看用户有权访问的未连接数据库上的所有表的元数据。

SVV\_EXTERNAL\_TABLES 对所有用户可见。超级用户可以查看所有行；普通用户只能查看其自己的数据。有关更多信息，请参阅 [系统表和视图中的数据可见性](cm_chap_system-tables.md#c_visibility-of-data)。

## 表列
<a name="r_SVV_EXTERNAL_TABLES-table-columns"></a>


| 列名称  | 数据类型  | 说明  | 
| --- | --- | --- | 
| redshift\_database\_name | 文本 | 本地 Amazon Redshift 数据库的名称。 | 
| schemaname | text  | 外部表的 Amazon Redshift 外部 schema 的名称。 | 
| tablename | text | 外部表的名称。 | 
| tabletype | text | 表的类型。某些值为 TABLE、VIEW、MATERIALIZED VIEW 或不表示任何信息的 "" 空字符串。 | 
| 位置 | text | 表的位置。 | 
| input\_format | text  | 输入格式 | 
| output\_format | text | 输出格式。 | 
| serialization\_lib | text  | 序列化库。 | 
| serde\_parameters | text | SerDe 参数。 | 
| compressed | integer | 用于指示表是否已压缩的值；1 表示已压缩，0 表示未压缩。 | 
| parameters | text | 表属性。 | 

## 示例
<a name="r_SVV_EXTERNAL_TABLES-example"></a>

以下示例显示 svv\_external\_tables 详细信息以及联合查询使用的外部 schema 上的谓词。

```
select schemaname, tablename from svv_external_tables where schemaname = 'apg_tpch';
schemaname  | tablename
------------+-----------
apg_tpch    | customer
apg_tpch    | lineitem
apg_tpch    | nation
apg_tpch    | orders
apg_tpch    | part
apg_tpch    | partsupp
apg_tpch    | region
apg_tpch    | supplier
(8 rows)
```