- Newest
- Most votes
- Most comments
I do not agree to the above rePost Agent’s answer as SVV_MV_INFO and SYS_MV_STATE do not contain column names or data types; they only track metadata like refresh status.
Regardless of UI changes in Query Editor v2, you can reliably check the columns and data types of any Materialized View by querying SVV_COLUMNS:
SELECT column_name, data_type
FROM svv_columns
WHERE table_name = 'your_mv_name' AND table_schema = 'your_schema';
Reference: https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_COLUMNS.html
In Amazon Redshift Query Editor v2, materialized views are typically displayed in the tree-view hierarchical structure under schemas, where you can work with tables, views, functions, and stored procedures. The Editor view provides a tree-view of your clusters or workgroups, databases, and schemas, with each object supporting a context menu for associated actions.
While materialized views are database objects that store precomputed result sets based on SQL queries, they are generally displayed separately from regular tables in the schema hierarchy. The temporary appearance of materialized views as tables in the objects tree was likely not an intended permanent feature, which would explain why it disappeared.
To view information about your materialized views, including their columns and structure, you can query system catalog tables and views such as SVV_MV_INFO, which provides details about materialized views including their database, schema, name, and state. You can also use SYS_MV_STATE to see the current state of materialized views. These system views allow you to programmatically access information about your materialized views' structure and metadata, even if they're not displayed exactly like tables in the visual tree structure.
Sources
Opening query editor v2 - Amazon Redshift
SVV_MV_INFO - Amazon Redshift
Materialized views in Amazon Redshift - Amazon Redshift
answered a month ago

If my answer was helpful, I would appreciate it if you could mark it as the accepted answer.