SnowConvert AI - Redshift - CREATE TABLE AS¶
Create Table As Syntax Grammar.
Description¶
Creates a new table based on a query. The owner of this table is the user that issues the command.
For more information please refer to CREATE TABLE AS documentation.
Grammar Syntax ¶
SnowConvert AI - Redshift - Table Start¶
BACKUP¶
Description¶
Enables Amazon Redshift to automatically adjust the encoding type for all columns in the table to optimize query performance. In Snowflake, the concept of BACKUP as seen in other databases is not directly applicable. Snowflake automatically handles data backup and recovery through its built-in features like Time Travel and Fail-safe, eliminating the need for manual backup operations. For these reasons, the statement BACKUP is removed during the transformation process
See the Redshift data distribution documentation for this syntax.
Grammar Syntax¶
Sample Source Patterns¶
NO option¶
An FDM is added since Snowflake, by default, always creates a backup of the created table.
Input Code:¶
Redshift¶
Output Code:¶
Snowflake¶
YES option¶
The option is removed since Snowflake, by default, applies a backup to the created table.
Input Code:¶
Redshift¶
Output Code:¶
Snowflake¶
¶
COLUMNS¶
Description¶
The name of a column in the new table. If no column names are provided, the column names are taken from the output column names of the query.
See the Redshift CREATE TABLE documentation for this syntax.
Grammar Syntax¶
Sample Source Patterns¶
Input Code:¶
Redshift¶
Output Code:¶
Snowflake¶
Related EWIs¶
There are no known issues.
LOCAL¶
Description¶
In Amazon Redshift, LOCAL TEMPORARY or TEMP are used to create temporary tables that exist only for the duration of the session. These tables are session-specific and automatically deleted when the session ends. They are useful for storing intermediate results or working data without affecting the permanent database schema.
See the Redshift CREATE TABLE documentation for this syntax.
Grammar Syntax¶
Sample Source Patterns¶
Input Code:¶
Redshift¶
Output Code:¶
Snowflake¶
Related EWIs¶
There are no known issues.
SnowConvert AI - Redshift - Table Attributes¶
DISTKEY¶
Description¶
In Amazon Redshift, DISTKEY is used to distribute data across cluster nodes to optimize query performance. Snowflake, however, automatically handles data distribution and storage without needing explicit distribution keys. Due to differences in architecture and data management approaches, Snowflake does not have a direct equivalent to Redshift’s DISTKEY. For these reasons, the statement DISTKEY is removed during the transformation process
See the Redshift data distribution documentation for this syntax.
Grammar Syntax¶
Sample Source Patterns¶
Input Code:¶
Redshift¶
Output Code:¶
Snowflake¶
Related EWIs¶
SSC-FDM-RS0001: Data storage option is not supported in Snowflake. Data distribution is automatically handled by Snowflake.
DISTSTYLE¶
Description¶
Keyword that defines the data distribution style for the whole table.
See the Redshift data distribution documentation for this syntax.
Grammar Syntax¶
Sample Source Patterns¶
Input Code:¶
Redshift¶
Output Code:¶
Snowflake¶
Related EWIs¶
SSC-FDM-RS0001: Data storage option is not supported in Snowflake. Data distribution is automatically handled by Snowflake.
SORTKEY¶
Description¶
The keyword that specifies that the column is the sort key for the table. In Snowflake, SORTKEY from Redshift can be migrated to CLUSTER BY because both optimize data storage for query performance. CLUSTER BY in Snowflake organizes data on specified columns, similar to how SORTKEY orders data in Redshift.
See the Redshift data distribution documentation for this syntax.
Grammar Syntax¶
Sample Source Patterns¶
Input Code:¶
Redshift¶
Output Code:¶
Snowflake¶
Related EWIs¶
SSC-FDM-RS0002: The performance of the CLUSTER BY may vary compared to the performance of Sortkey.