TPT
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 LOADJOB
DESCRIPTION 'LOAD AC_SCHEMA TABLE FROM A FILE'
JobBodyTranslated code
# Some comments on the job
class LOADJOB:
# DESCRIPTION 'LOAD AC_SCHEMA TABLE FROM A FILE'
JobBodyDefine Schema transformation
The schema statement is translated to an attribute in the class created for the job statement.
Source code
Translated code
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
DDL Operator
Source code for DDL operator
Translated code
UPDATE Operator
Source code for UPDATE operator
Translated code
DATA CONNECTOR PRODUCER Operator
Source code for Data Connector Producer operator
Translated code
Define step transformation
Steps are too translated to python functions inside the class generated for the job, they will be called in the main function of the translated code.
Step source code
Translated code
Main function
The main function is always generated for any scripting language, for TPT the main function contains an instance of the job class and calls to the steps in the job
Main function sample code
Last updated
Was this helpful?