This section illustrates TPT translation from Teradata to Snowflake.
TPT statements transformation
All TPT statements, like other Teradata scripting languages, are being converted to python code. Here are some examples of transformations already supported.
Define Job header transformation
The job statement is translated to a python class with all the statements like operators, schema definitions, and steps inside of it.
Source code
/* Some comments on the job */DEFINE JOB LOADJOBDESCRIPTION'LOAD AC_SCHEMA TABLE FROM A FILE'JobBody
Translated code
# Some comments on the jobclassLOADJOB:# DESCRIPTION 'LOAD AC_SCHEMA TABLE FROM A FILE' JobBody
Define Schema transformation
The schema statement is translated to an attribute in the class created for the job statement.
classJOBNAME: DCS_SCHEMA ="""( PNRHEADER_ID VARCHAR(24), PNRLOCPERIOD VARCHAR(58), CRTDATE VARCHAR /*** MSC-WARNING - SSC-FDM-TD0002 - COLUMN CONVERTED FROM CLOB DATA TYPE ***/, REQTYP VARIANT, seqno INTEGER, resdata INTEGER, );"""
Define Operator transformation
The operators are translated to python functions inside the class generated for the job. The examples provided are the operators that SnowConvert currently supports