SVV_EXTERNAL_TABLES - Amazon Redshift

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

SVV_EXTERNAL_TABLES

使用 SVV_EXTERNAL_TABLES 檢視外部資料表的詳細資訊;如需詳細資訊,請參閱 CREATE EXTERNAL SCHEMA。也可以使用 SVV_EXTERNAL_TABLES 進行跨資料庫查詢,以檢視使用者有權存取的未連線資料庫上所有資料表的中繼資料。

所有使用者都可看見 SVV_EXTERNAL_TABLES。超級使用者可以看見所有資料列;一般使用者只能看見自己的資料。如需詳細資訊,請參閱 系統資料表和檢視中資料的可見性

資料表欄

欄名稱 資料類型 描述
redshift_database_name text 本機 Amazon Redshift 資料庫的名稱。
結構描述名稱 text 外部資料表之 Amazon Redshift 外部結構描述的名稱。
資料表名稱 text 外部資料表名稱。
tabletype text 資料表的類型。某些值為 TABLE、VIEW、MATERIALIZED VIEW 或代表沒有資訊的空字串 " "。
location text 資料表的位置。
input_format text 輸入格式
output_format text 輸出格式。
serialization_lib text 序列化程式庫。
serde_parameters text SerDe 參數。
已壓縮 integer 此值指出資料表是否已壓縮;1 表示已壓縮,0 表示未壓縮。
parameters text 資料表屬性。

範例

下列範例顯示詳細資料 svv_external_tables,其具有聯合查詢所使用之外部結構描述上的述詞。

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)