Introduction to Redshift
Jason Myers
Principal Architect
-- View the database and schema names with the schema type
SELECT database_name,
schema_name,
schema_type
-- From the internal schemas view
FROM SVV_REDSHIFT_SCHEMAS;
database_name | schema_name | schema_type
=====================|=====================| ===========
datacamp_course_prod | information_schema | local
datacamp_course_prod | pg_catalog | local
datacamp_course_prod | public | local
dev | information_schema | local
dev | pg_catalog | local
dev | public | local
-- View the table name
SELECT table_name
-- Using a view with both internal and external tables
FROM SVV_ALL_TABLES
-- In the external spectrumdb schema
WHERE schema_name = 'spectrumdb';
table_name
======================
ecommerce_sales
global_power_plant_db
coffee_county_weather
idaho_site_id
idaho_samples
Introduction to Redshift