amazon-web-services - List of external schemas and tables from Amazon Redshift
问题描述
I have created external schema and external table in Redshift. I'm able to see external schema name in postgresql using \dn.
What will be query to do it so that i can run it in java? and also the query to get list of external table?
I tried
select * from information_schema.tables where
table_schema not in ('pg_catalog', 'information_schema')
and table_schema not like 'pg_toast%'
but it didn't get the list of external tables.
解决方案
Redshift Spectrum 外部数据库、模式和表有自己的目录视图。
- SVV_EXTERNAL_DATABASES
- SVV_EXTERNAL_SCHEMAS
- SVV_EXTERNAL_TABLES
- SVV_EXTERNAL_PARTITIONS
- SVV_EXTERNAL_COLUMNS
您可以从任何连接查询这些:SELECT * FROM svv_external_schemas;
推荐阅读
- laravel - 产品总价 laravel
- database - 如何将可迭代值更新到 Flutter 中的 sqflite 表中
- python - 在 C# 中将字符串转换为合法的类名
- c# - Dialogflow webhook 响应显示不可用
- r - 修改简历包R生成的简历
- r - 为什么在 dplyr 1.0.0 中的速度比 summarise_all 慢?
- java - java.lang.NoClassDefFoundError: Landroid/content/Context;
- javascript - JSON解析\"和"
- python - Kivy 将文本输入绑定到提交按钮给出 AttributeError: 'NoneType' 对象没有属性 'text'
- javascript - 在 Rails 控制器和视图中删除 JSON 格式