DISTSTYLE

Description

Keyword that defines the data distribution style for the whole table.

Click here to navigate to the Amazon Redshift docs page for this syntax.

DISTSTYLE (column) option is only supported DISTSTYLE KEY and other options are removed because they are not applicable in Snowflake.

Grammar Syntax

DISTSTYLE { AUTO | EVEN | KEY | ALL }

Sample Source Patterns

Amazon Redshift

CREATE TABLE TABLE1 
(
 COL1 INT DISTKEY,
 COL2 VARCHAR(15)
) 
DISTSTYLE KEY;

CREATE TABLE TABLE2
(
 COL1 INT,
 COL2 VARCHAR(15)
) 
DISTSTYLE ALL;

Snowflake

CREATE TABLE TABLE1
(
 COL1 INT
--          --** MSC-WARNING - MSC-RS0012 - DISTSTYLE ON THE COLUMN SHOULD BE MOVED TO TABLE OPTIONS BY CLUSTER BY. **
--          DISTKEY
                 ,
 COL2 VARCHAR(15)
)
CLUSTER BY (COL1)
----** MSC-WARNING - MSC-RS0013 - DISTSTYLE KEY OPTION IS REPLACED BY CLUSTER ON SNOWFLAKE USING DISTKEY OPTION. **
--DISTSTYLE KEY
             ;

CREATE TABLE TABLE2
(
 COL1 INT,
 COL2 VARCHAR(15)
)
----** MSC-WARNING - MSC-RS0011 - DISTSTYLE OPTION NOT SUPPORTED. DATA STORAGE IS AUTOMATICALLY HANDLED BY SNOWFLAKE. **
--DISTSTYLE ALL
             ;
  1. MCS-RS0013: DistStyle option is replaced by 'CLUSTER BY' on Snowflake using DISTKEY option.

  2. MCS-RS0011: DistStyle option not supported. Data storage is automatically handled by Snowflake.

Last updated