Amazon Redshift 自 2025 年 11 月 1 日起不再支援建立新的 Python UDF。如果您想要使用 Python UDF,請在該日期之前建立 UDF。現有 Python UDF 將繼續正常運作。如需詳細資訊,請參閱部落格文章
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)