Tables
Translation reference to convert Teradata TABLE statement to Snowflake
Some parts in the output code are omitted for clarity reasons.
Description
Teradata's TABLE statement is translated to Snowflake TABLE syntax.
For more information on Teradata TABLEs, check here.
Sample Source Patterns
Simple Create Table
Teradata
Snowflake
Table Kind Clause - SET and MULTISET
Teradata's kind clause determines whether duplicate rows are permitted (MULTISET) or not (SET).
Teradata
Snowflake
Volatile and Global Temporary Tables
Teradata's Volatile and Global Temporary tables are used for the temporary storage of data. Their difference lies in that the table definition (DDL) of Global Temporary tables is persisted in the Data Dictionary, while Volatile tables definition is not stored.
Teradata
Snowflake
With data and with no data option
Teradata
Snowflake
Snowflake's Reserved & Limited Keywords
SnowConvert facilitates seamless SQL migrations to Snowflake by addressing challenges associated with reserved keywords. As per Snowflake's reserved and limited keyword documentation, certain keywords cannot be used as column names, table names, or aliases without special handling. SnowConvert includes functionality to ensure SQL code compatibility in such cases.
Reserved ANSI Keywords as Column Names
For column names that match ANSI or Snowflake reserved keywords, SnowConvert automatically wraps the column name in double quotes ("
) to comply with Snowflake's syntax rules. This adjustment ensures that queries with these column names compile correctly in Snowflake without requiring manual intervention.
Example:
Snowflake
Snowflake-Specific Reserved Keywords
Columns that match Snowflake-specific reserved keywords (e.g., CONSTRAINT
, CURRENT_DATE
, CURRENT_TIME
) may still cause compilation issues even when wrapped in quotes. SnowConvert detects these instances and generates a warning with code SSC-EWI-0045
, prompting users to review and potentially rename these columns for compatibility.
Example:
Snowflake
Known Issues
1. Create table options not supported
As shown in the example "Simple Create Table", Snowflake does not support Teradata create table options. They are removed.
2. Partition by performance issues
In the example "Simple Create Table", the partition by
statement is removed due to performance considerations.
3. Primary Index moved
In Teradata, the primary index constraint is declared outside of the create table
statement, but in Snowflake it is required to be inside, as shown in the example "Simple Create Table".
4. SET semantics not supported
As shown in the example "Table Kind Clause - SET and MULTISET", Snowflake does not support Teradata's SET semantics. They are removed.
5. Global Temporary table option not supported
As shown in the example "Volatile and Global Temporary Table", Snowflake does not support Teradata's Global Temporary table option. It will be removed.
6. Compress unsupported
COMPRESS (value1. value2, value3)
is removed due to being unsupported.
7. On commit unsupported
On commit
is removed due to being unsupported.
8. Block compression unsupported
Block compression
is removed due to being unsupported.
9. Normalize unsupported
Normalize
is removed due to being unsupported.
Related EWIs
SSC-FDM-0009: GLOBAL TEMPORARY TABLE functionality not supported.
SSC-FDM-0019: Sematic information could not be loaded.
SSC-FDM-TD0024: Set table functionality not supported.
SSC-PRF-0007: CLUSTER BY performance review.
SSC-EWI-0045: Column Name is Snowflake Reserved Keyword.
Last updated