mayank singh
mayank singh

Reputation: 323

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.

Upvotes: 15

Views: 15581

Answers (1)

Joe Harris
Joe Harris

Reputation: 14035

Redshift Spectrum external databases, schemas, and tables have their own catalog views.

You can query these from any connection: SELECT * FROM svv_external_schemas;

Upvotes: 28

Related Questions