How to determine the distribution style of a table in Redshift database

You can query the SVV_TABLE_INFO view to determine the distribution style of a table.

select "database", "schema", "table", "diststyle" from SVV_TABLE_INFO where "schema"='schemaname' and "table"='tablename';

Distribution style can be one of the 5 values – AUTO(ALL), AUTO(EVEN),ALL, EVEN, or KEY.

See also  How to download multiple files from an S3 bucket