SnowConvert: Teradata DDL Statements¶
Tables¶
Note
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
CREATE TABLE table1, no fallback,
no before journal,
no after journal (
c1 INTEGER NOT NULL,
f1 INTEGER NOT NULL,
p1 INTEGER NOT NULL,
DATE,
TIME,
FOREIGN KEY(f1) REFERENCES WITH CHECK OPTION table2 (d1)
)
UNIQUE PRIMARY INDEX(c1)
PARTITION BY COLUMN(p1);
Snowflake
CREATE OR REPLACE TABLE table1 (
c1 INTEGER NOT NULL,
f1 INTEGER NOT NULL,
p1 INTEGER NOT NULL,
DATE,
TIME,
FOREIGN KEY(f1) REFERENCES table2 (d1) ,
UNIQUE (c1)
)
--** SSC-PRF-0007 - PERFORMANCE REVIEW - CLUSTER BY **
CLUSTER BY (p1)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
;
Table Kind Clause - SET and MULTISET¶
Teradata’s kind clause determines whether duplicate rows are permitted (MULTISET) or not (SET).
Teradata¶
-- Set semantics
CREATE SET TABLE table1 (
column1 INTEGER
);
--Multiset semantics
CREATE MULTISET TABLE table2(
column1 INTEGER
);
Snowflake¶
-- Set semantics
--** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
CREATE OR REPLACE TABLE table1 (
column1 INTEGER
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
;
--Multiset semantics
CREATE OR REPLACE TABLE table2 (
column1 INTEGER
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
;
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¶
--Global Temporary Table
CREATE MULTISET GLOBAL TEMPORARY TABLE table1 (
column1 INTEGER
);
--Volatile Table
CREATE MULTISET VOLATILE TABLE table3 (
column1 INTEGER
);
Snowflake¶
--Global Temporary Table
--** SSC-FDM-0009 - GLOBAL TEMPORARY TABLE FUNCTIONALITY NOT SUPPORTED. **
CREATE OR REPLACE TABLE table1 (
column1 INTEGER
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
;
--Volatile Table
CREATE OR REPLACE TEMPORARY TABLE table3 (
column1 INTEGER
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
;
With data and with no data option¶
Teradata
-- With data
CREATE TABLE table1 AS table2 WITH DATA
-- With no data
CREATE TABLE table1 AS table2 WITH NO DATA
Snowflake
-- With data
CREATE OR REPLACE TABLE table1 CLONE table2
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
;
-- With no data
--** SSC-FDM-0019 - SEMANTIC INFORMATION COULD NOT BE LOADED FOR table1. CHECK IF THE NAME IS INVALID OR DUPLICATED. **
CREATE OR REPLACE TABLE table1 LIKE table2
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
;
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:
CREATE TABLE ReservedKeywords (
"CREATE" VARCHAR(50),
FOLLOWING VARCHAR(50),
"ILIKE" VARCHAR(50),
RLIKE VARCHAR(50)
);
Snowflake
CREATE OR REPLACE TABLE ReservedKeywords (
"CREATE" VARCHAR(50),
"FOLLOWING" VARCHAR(50),
"ILIKE" VARCHAR(50),
"RLIKE" VARCHAR(50)
)
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "transact", "convertedOn": "11/28/2024", "domain": "test" }}'
;
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:
CREATE TABLE ColumnReservedNames (
"CONSTRAINT" VARCHAR(50),
"CURRENT_DATE" VARCHAR(50),
"CURRENT_TIME" VARCHAR(50)
);
Snowflake
CREATE OR REPLACE TABLE ColumnReservedNames (
!!!RESOLVE EWI!!! /*** SSC-EWI-0045 - COLUMN NAME 'CONSTRAINT' IS A SNOWFLAKE RESERVED KEYWORD ***/!!!
"CONSTRAINT" VARCHAR(50),
!!!RESOLVE EWI!!! /*** SSC-EWI-0045 - COLUMN NAME 'CURRENT_DATE' IS A SNOWFLAKE RESERVED KEYWORD ***/!!!
"CURRENT_DATE" VARCHAR(50),
!!!RESOLVE EWI!!! /*** SSC-EWI-0045 - COLUMN NAME 'CURRENT_TIME' IS A SNOWFLAKE RESERVED KEYWORD ***/!!!
"CURRENT_TIME" VARCHAR(50)
)
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "transact", "convertedOn": "11/28/2024", "domain": "test" }}'
;
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.
WITH DEFAULT¶
Note
Some parts in the output code are omitted for clarity reasons.
Description¶
Teradata’s WITH DEFAULT
clause sets a system-default value to columns that are inserted with no values. This value is typically the equivalent of zero or empty.
Syntax:¶
WITH DEFAULT
The following table shows Teradata’s data types, their corresponding type in Snowflake, and the default value to be set if supported.
Teradata | Snowflake | Default Value |
---|---|---|
BLOB[(n)] | BYTE | NOT SUPPORTED |
BYTE[(n)] | BYTE | NOT SUPPORTED |
VARBYTE[(n)] | BYTE | NOT SUPPORTED |
BIGINT | BIGINT | 0 |
BYTEINT | BYTEINT | 0 |
DECIMAL [(n[,m])] | DECIMAL | 0 |
DOUBLE PRECISION | DOUBLE PRECISION | 0 |
FLOAT | FLOAT | 0 |
INTEGER | INTEGER | 0 |
NUMBER(n[,m]) | NUMBER | 0 |
NUMBER[(*[,m])] | NUMBER | 0 |
NUMERIC [(n[,m])] | NUMERIC | 0 |
REAL | REAL | 0 |
SMALLINT | SMALLINT | 0 |
DATE | DATE | CURRENT_DATE |
TIME [(n)] | TIME | CURRENT_TIME |
TIMESTAMP [(n)] | TIMESTAMP | CURRENT_TIMESTAMP |
TIMESTAMP WITH TIME ZONE | TIMESTAMP_TZ | LOCALTIMESTAMP |
INTERVAL DAY [(n)] | VARCHAR(21) | '0DAY' |
INTERVAL DAY [(n)] TO HOUR | VARCHAR(21) | '0DAY' |
INTERVAL DAY [(n)] TO MINUTE | VARCHAR(21) | '0DAY' |
INTERVAL DAY [(n)] TO SECOND | VARCHAR(21) | '0DAY' |
INTERVAL HOUR [(n)] | VARCHAR(21) | '0HOUR' |
INTERVAL HOUR [(n)] TO MINUTE | VARCHAR(21) | '0HOUR' |
INTERVAL HOUR [(n)] TO SECOND | VARCHAR(21) | '0HOUR' |
INTERVAL MINUTE [(n)] | VARCHAR(21) | '0MINUTE' |
INTERVAL MINUTE [(n)] TO SECOND [(m)] | VARCHAR(21) | '0MINUTE' |
INTERVAL MONTH | VARCHAR(21) | '0MONTH' |
INTERVAL SECOND [(n,[m])] | VARCHAR(21) | '0SECOND' |
INTERVAL YEAR [(n)] | VARCHAR(21) | '0YEAR' |
INTERVAL YEAR [(n)] TO MONTH | VARCHAR(21) | '0YEAR' |
CHAR[(n)] | CHAR | '' |
CHARACTER(n) CHARACTER SET GRAPHIC | - | NOT SUPPORTED |
CLOB | - | NOT SUPPORTED |
CHAR VARYING(n) | VARCHAR | '' |
LONG VARCHAR | - | NOT SUPPORTED |
LONG VARCHAR CHARACTER SET GRAPHIC | - | NOT SUPPORTED |
VARCHAR(n) | VARCHAR | '' |
VARCHAR(n) CHARACTER SET GRAPHIC | - | NOT SUPPORTED |
PERIOD(DATE) | VARCHAR(24) | NOT SUPPORTED |
PERIOD(TIME [(n)]) | VARCHAR(24) | NOT SUPPORTED |
PERIOD(TIMESTAMP [(n)]) | VARCHAR(24) | NOT SUPPORTED |
Sample Source Patterns¶
Teradata¶
CREATE TABLE SAMPLE_TABLE
(
ID INT,
-- Numeric Types
big_integer_col BIGINT WITH DEFAULT,
byteint_col BYTEINT WITH DEFAULT,
decimal_col DECIMAL(10,2) WITH DEFAULT,
double_precision_col DOUBLE PRECISION WITH DEFAULT,
float_col FLOAT WITH DEFAULT,
integer_col INTEGER WITH DEFAULT,
number_col NUMBER WITH DEFAULT,
numeric_col NUMERIC(10,2) WITH DEFAULT,
real_col REAL WITH DEFAULT,
smallint_col SMALLINT WITH DEFAULT,
-- Character Types
char_col CHAR(50) WITH DEFAULT,
character_col CHARACTER(50) WITH DEFAULT,
--clob_col CLOB,
char_varying_col CHAR VARYING(100) WITH DEFAULT,
--long_varchar_col LONG VARCHAR WITH DEFAULT,
--long_varchar_graphic_col LONG VARCHAR CHARACTER SET GRAPHIC WITH DEFAULT,
varchar_col VARCHAR(255) WITH DEFAULT,
--varchar_graphic_col VARCHAR(255) CHARACTER SET GRAPHIC WITH DEFAULT,
-- Date and Time Types
date_col DATE WITH DEFAULT,
time_col TIME WITH DEFAULT,
time_precision_col TIME(6) WITH DEFAULT,
timestamp_col TIMESTAMP WITH DEFAULT,
timestamp_precision_col TIMESTAMP(6) WITH DEFAULT,
tz_timestamp_col TIMESTAMP WITH TIME ZONE WITH DEFAULT,
tz_timestamp_precision_col TIMESTAMP(6) WITH TIME ZONE WITH DEFAULT,
interval_col INTERVAL DAY(4) WITH DEFAULT,
interval_day_to_hour_col INTERVAL DAY(4) TO HOUR WITH DEFAULT,
interval_hour_col INTERVAL HOUR(2) WITH DEFAULT,
interval_minute_col INTERVAL MINUTE(2) WITH DEFAULT,
interval_month_col INTERVAL MONTH WITH DEFAULT,
interval_second_col INTERVAL SECOND(2) WITH DEFAULT,
interval_year_col INTERVAL YEAR(4) WITH DEFAULT,
-- Binary Types
-- blob_col BLOB(1000),
byte_col BYTE(1000) WITH DEFAULT,
varbyte_col VARBYTE(1000) WITH DEFAULT
);
Snowflake ¶
CREATE OR REPLACE TABLE SAMPLE_TABLE
(
ID INT,
-- Numeric Types
big_integer_col BIGINT DEFAULT 0,
byteint_col BYTEINT DEFAULT 0,
decimal_col DECIMAL(10,2) DEFAULT 0,
double_precision_col DOUBLE PRECISION DEFAULT 0,
float_col FLOAT DEFAULT 0,
integer_col INTEGER DEFAULT 0,
number_col NUMBER(38, 18)
-- WITH DEFAULT
-- !!!RESOLVE EWI!!! /*** SSC-EWI-0021 - WITH DEFAULT FOR 'NUMBER' NOT SUPPORTED IN SNOWFLAKE ***/!!!
,
numeric_col NUMERIC(10,2) DEFAULT 0,
real_col REAL DEFAULT 0,
smallint_col SMALLINT DEFAULT 0,
-- Character Types
char_col CHAR(50) DEFAULT '',
character_col CHARACTER(50)
-- WITH DEFAULT
-- !!!RESOLVE EWI!!! /*** SSC-EWI-0021 - WITH DEFAULT FOR 'CHARACTER(50)' NOT SUPPORTED IN SNOWFLAKE ***/!!!
,
--clob_col CLOB,
char_varying_col CHAR VARYING(100)
-- WITH DEFAULT
-- !!!RESOLVE EWI!!! /*** SSC-EWI-0021 - WITH DEFAULT FOR 'CHAR VARYING(100)' NOT SUPPORTED IN SNOWFLAKE ***/!!!
,
--long_varchar_col LONG VARCHAR WITH DEFAULT,
--long_varchar_graphic_col LONG VARCHAR CHARACTER SET GRAPHIC WITH DEFAULT,
varchar_col VARCHAR(255) DEFAULT '',
--varchar_graphic_col VARCHAR(255) CHARACTER SET GRAPHIC WITH DEFAULT,
-- Date and Time Types
date_col DATE DEFAULT CURRENT_DATE,
time_col TIME DEFAULT CURRENT_TIME,
time_precision_col TIME(6) DEFAULT CURRENT_TIME(6),
timestamp_col TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
timestamp_precision_col TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(6),
tz_timestamp_col TIMESTAMP_TZ DEFAULT LOCALTIMESTAMP,
tz_timestamp_precision_col TIMESTAMP_TZ(6) DEFAULT LOCALTIMESTAMP(6),
interval_col VARCHAR(21) !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - INTERVAL DAY(4) DATA TYPE CONVERTED TO VARCHAR ***/!!! DEFAULT '0DAY',
interval_day_to_hour_col VARCHAR(21) !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - INTERVAL DAY(4) TO HOUR DATA TYPE CONVERTED TO VARCHAR ***/!!! DEFAULT '0DAY',
interval_hour_col VARCHAR(21) !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - INTERVAL HOUR(2) DATA TYPE CONVERTED TO VARCHAR ***/!!! DEFAULT '0HOUR',
interval_minute_col VARCHAR(21) !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - INTERVAL MINUTE(2) DATA TYPE CONVERTED TO VARCHAR ***/!!! DEFAULT '0MINUTE',
interval_month_col VARCHAR(21) !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - INTERVAL MONTH DATA TYPE CONVERTED TO VARCHAR ***/!!! DEFAULT '0MONTH',
interval_second_col VARCHAR(21) !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - INTERVAL SECOND(2) DATA TYPE CONVERTED TO VARCHAR ***/!!! DEFAULT '0SECOND',
interval_year_col VARCHAR(21) !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - INTERVAL YEAR(4) DATA TYPE CONVERTED TO VARCHAR ***/!!! DEFAULT '0YEAR',
-- Binary Types
-- blob_col BLOB(1000),
byte_col BINARY
-- WITH DEFAULT
-- !!!RESOLVE EWI!!! /*** SSC-EWI-0021 - WITH DEFAULT FOR 'BYTE(1000)' NOT SUPPORTED IN SNOWFLAKE ***/!!!
,
varbyte_col BINARY(1000)
-- WITH DEFAULT
-- !!!RESOLVE EWI!!! /*** SSC-EWI-0021 - WITH DEFAULT FOR 'VARBYTE(1000)' NOT SUPPORTED IN SNOWFLAKE ***/!!!
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"teradata"}}'
;
Known Issues¶
1. Unsupported types¶
As shown in the table in the description table, some types are not supported and no default value will be set when transforming the WITH DEFAULT
clause.
Related EWIs¶
SSC-EWI-0021: Not Supported in Snowflake.
SSC-EWI-0036: Data type converted to another data type.
Index¶
Warning
Currently, Create Index statement is not being converted but it is being parsed. Also, if your source code has Create index
statements, these are going to be accounted for in the Assessment Report.
Example of Create Index
CREATE INDEX (col1, col2, col3) ORDER BY VALUES (col2) ON table1;
CREATE INDEX my_index_name ON my_table (column1, column2);
Note
Due to architectural reasons, Snowflake does not support indexes so, SnowConvert will remove all the code related to the creation of indexes. Snowflake automatically creates micro-partitions for every table that help speed up the performance of DML operations, the user does not have to worry about creating or managing these micro-partitions.
Usually, this is enough to have a very good query performance however, there are ways to improve it by creating data clustering keys. Snowflake’s official page provides more information about micro-partitions and data clustering.
Join Index¶
Description ¶
In Snowconvert, Teradata Join Indexes are transformed into Snowflake Dynamic Tables. To properly configure Dynamic Tables, two essential parameters must be defined: TARGET_LAG and WAREHOUSE. If these parameters are left unspecified in the configuration options, Snowconvert will default to preassigned values during the conversion, as demonstrated in the example below.
For more information on Join Indexes, click here.
For details on the necessary parameters for Dynamic Tables, click here.
Sample Source Patterns¶
Teradata
CREATE JOIN INDEX Employee
AS
SELECT
Employee_Id,
First_Name,
Last_Name,
BirthDate,
DepartmentNo
FROM Employee
PRIMARY INDEX (First_Name);
Snowflake
CREATE OR REPLACE DYNAMIC TABLE Employee
--** SSC-FDM-0031 - DYNAMIC TABLE REQUIRED PARAMETERS SET BY DEFAULT **
TARGET_LAG='1 day'
WAREHOUSE=UPDATE_DUMMY_WAREHOUSE
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"teradata"}}'
AS
SELECT
Employee_Id,
First_Name,
Last_Name,
BirthDate,
DepartmentNo
FROM
Employee;
Known Issues¶
No known errors detected at this time.
Related EWIs¶
SSC-FDM-0031: Dynamic Table required parameters set by default
Schema¶
Description ¶
The translation of the CREATE SCHEMA
statement from Teradata to Snowflake is simple, as the basic syntax remains the same.
Sample Source Patterns¶
Teradata
CREATE SCHEMA IF EXISTS schema_name;
Snowflake
CREATE SCHEMA IF EXISTS schema_name
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "teradata", "convertedOn": "07/23/2024" }}'
;
Known Issues¶
WITH Properties of CREATE SCHEMA¶
The WITH
properties associated with the CREATE SCHEMA
statement in Teradata are not supported in Snowflake, as there is no equivalent functionality available.
Teradata
CREATE SCHEMA IF EXISTS schema_name
WITH ( PROPERTY1 = PROPERTYNAME, PROPERTY2 = PROPERTTYNAME, PROPERTY3 = PROPERTTYNAME);
Snowflake
CREATE SCHEMA IF EXISTS schema_name
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "teradata", "convertedOn": "07/23/2024" }}'
!!!RESOLVE EWI!!! /*** SSC-EWI-0073 - PENDING FUNCTIONAL EQUIVALENCE REVIEW FOR 'SCHEMA WITH' NODE ***/!!!
WITH ( PROPERTY1 = PROPERTYNAME, PROPERTY2 = PROPERTTYNAME, PROPERTY3 = PROPERTTYNAME);
Related EWIs¶
SSC-EWI-0073: Pending Functional Equivalence Review.
Views¶
Note
Some parts in the output code are omitted for clarity reasons.
Description ¶
Teradata’s VIEW statement is translated to Snowflake VIEW syntax.
For more information on Teradata VIEW, check here.
Sample Source Patterns¶
Create View Transformation¶
Teradata
CREATE VIEW view1 (someTable.col1, someTable.col2) AS locking row for access
SELECT
my_table.col1, my_table.col2
FROM table1 AS my_table
WHERE my_table.col1 = 'SpecificValue'
UNION ALL
SELECT other_table.col2
FROM table2 AS other_table
WHERE my_table.col2 = other_table.col2
Snowflake
--** SSC-FDM-0007 - MISSING DEPENDENT OBJECTS "table1", "table2" **
CREATE OR REPLACE VIEW view1
(
col1,
col2)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
AS
SELECT
my_table.col1,
my_table.col2
FROM
table1 AS my_table
WHERE my_table.col1 = 'SpecificValue'
UNION ALL
SELECT
other_table.col2
FROM
table2 AS other_table
WHERE my_table.col2 = other_table.col2;
Custom Schema Tag¶
The custom schema is specified in the comment section before the specification of the view, with an XML tag named “sc-view” that contains only the value of the schema and the view name separated with a period ‘.’ as shown below: <sc-view>SCHEMANAME.VIEWNAME</sc-view>
The custom schema will be used as a view qualifier, and then the name of the view and all the objects referred to in the FROM queries and inner queries will be using that custom schema. Therefore could be several views with the same name, but with different custom tags. Example: two views with the same name, will take the custom schema tag information to perform the translation.
Teradata¶
/*<sc-view>RMSviews.EMPLOYEEB</sc-view>*/
REPLACE VIEW EMPLOYEEB AS
SELECT * FROM EMPLOYEE
WHERE AREA = "AREAB";
/*<sc-view>Views.EMPLOYEEB</sc-view>*/
REPLACE VIEW EMPLOYEEB AS
SELECT * FROM EMPLOYEE
WHERE AREA = "AREAB";
Snowflake¶
The transformation for Snowflake will vary depending on the customized schema name MySchema
, customized database name MyDatabase
or not selecting a customized database or schema in the conversion settings.
/*<sc-view>RMSviews.EMPLOYEEB</sc-view>*/
--** SSC-FDM-0007 - MISSING DEPENDENT OBJECT "EMPLOYEE" **
CREATE OR REPLACE VIEW RMSviews.EMPLOYEEB
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
AS
SELECT
* FROM
RMSviews.EMPLOYEE
WHERE AREA = "AREAB";
/*<sc-view>Views.EMPLOYEEB</sc-view>*/
--** SSC-FDM-0007 - MISSING DEPENDENT OBJECT "EMPLOYEE" **
--** SSC-FDM-0019 - SEMANTIC INFORMATION COULD NOT BE LOADED FOR Views.EMPLOYEEB. CHECK IF THE NAME IS INVALID OR DUPLICATED. **
CREATE OR REPLACE VIEW Views.EMPLOYEEB
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
AS
SELECT
* FROM
Views.EMPLOYEE
WHERE AREA = "AREAB";
/*<sc-view>RMSviews.EMPLOYEEB</sc-view>*/
CREATE OR REPLACE VIEW MyDatabase.RMSviews.EMPLOYEEB
AS
SELECT * FROM MyDatabase.RMSviews.EMPLOYEE
WHERE AREA = "AREAB";
/*<sc-view>Views.EMPLOYEEB</sc-view>*/
CREATE OR REPLACE VIEW MyDatabase.Views.EMPLOYEEB
AS
SELECT * FROM MyDatabase.Views.EMPLOYEE
WHERE AREA = "AREAB";
/*<sc-view>RMSviews.EMPLOYEEB</sc-view>*/
CREATE OR REPLACE VIEW RMSviews.PUBLIC.EMPLOYEEB
AS
SELECT * FROM RMSviews.PUBLIC.EMPLOYEE
WHERE AREA = "AREAB";
/*<sc-view>Views.EMPLOYEEB</sc-view>*/
CREATE OR REPLACE VIEW Views.PUBLIC.EMPLOYEEB
AS
SELECT * FROM Views.PUBLIC.EMPLOYEE
WHERE AREA = "AREAB";
Known Issues¶
1. Locking row for access logic difference¶
In Snowflake, access to objects and elements is based on users and privileges.
Related EWIs¶
SSC-FDM-0007: Element with missing dependencies.
SSC-FDM-0019: Sematic information could not be loaded.