SVV_EXTERNAL_TABLES - Amazon Redshift
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

SVV_EXTERNAL_TABLES

使用 SVV_EXTERNAL_TABLES 可查看外部表的详细信息;有关更多信息,请参阅CREATE EXTERNAL SCHEMA。对于跨数据库查询,也可以使用 SVV_EXTERNAL_TABLES 来查看用户有权访问的未连接数据库上的所有表的元数据。

SVV_EXTERNAL_TABLES 对所有用户可见。超级用户可以查看所有行;普通用户只能查看其自己的数据。有关更多信息,请参阅 系统表和视图中的数据可见性

表列

列名称 数据类型 描述
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 表属性。

示例

以下示例显示 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)