FLOAD
Translation references to convert Teradata FLOAD files to Python
Last updated
Translation references to convert Teradata FLOAD files to Python
Last updated
Teradata FastLoad is a command‑driven utility for quickly loading large amounts of data in an empty table on a Teradata Database.
In order to simulate the FastLoad functionality for Teradata in Snowflake, FastLoad files and commands are transformed to Python code, similar to the transformations performed for BTEQ and MultiLoad scripts. The generated code uses the Snowflake Python project called which contains the required functions to simulate the FastLoad statements in Snowflake.
Most of the are considered not relevant in Snowflake, these commands are commented out. Below is the summary list of FastLoad commands and their transformation status into Snowflake:
AXSMOD
Commented
​
Transformed
​The node is commented out since the transformation occurs in the related INSERT statement instead.
CLEAR
Commented
​
DATEFORM
Commented
​
Transformed
​
Transformed
​Commented out since is not necessary for the transformation of the BEGIN LOADING.
ERRLIMIT
Commented
​
HELP
Commented
​
HELP TABLE
Commented
​
Transformed
Transformed as part of the BEGIN LOADING.
LOGDATA
Commented
​
LOGMECH
Commented
​
LOGOFF
Commented
​
LOGON
Commented
​
NOTIFY
Commented
​
OS
Commented
​
QUIT
Commented
​
RECORD
Commented
​
RUN
Commented
​
SESSIONS
Commented
​
Transformed
​
SET SESSION CHARSET
Commented
​
SHOW
Commented
​
SHOW VERSIONS
Commented
​
SLEEP
Commented
​
TENACITY
Commented
​
The default behavior of the ConversionTool for these statements is to comment them out. For example:
Teradata (FastLoad)
Snowflake (Python)
Nonetheless, there are some exceptions that must be converted to specific Python statements in order to work as intended in Snowflake.
The transformation for the command BEGIN LOADING
is a multi-part transformation that requires the DEFINE, INSERT and (optionally) SET RECORD commands to simulate its behavior correctly.
As stated above, this command is not required for the transformation of the BEGIN LOADING. If not found, the default delimiter will be set to ',' (comma). Else, the defined delimiter will be used.
Teradata (FastLoad)
Snowflake (Python)
Stage
Input Data Place Holder
Internal stage
@my_int_stage
External stage
@my_int_stage/path/file.csv
Amazon S3 bucket
s3://mybucket/data/files
Google Cloud Storage
gcs://mybucket/data/files
Microsoft Azure
azure://myaccount.blob.core.windows.net/mycontainer/data/files
FastLoad scripts support Teradata statements inside the same file. The majority of these statements are converted just as if they were inside a BTEQ file, with some exceptions.
Dropping an error table is commented out if inside a FastLoad file.
Teradata (FastLoad)
Snowflake (Python)
Given the transformations shown above for a variety of commands, consider the following example.
Teradata (FastLoad)
Snowflake (Python)
No issues were found.
This transformation is fully explained in this .
In the example above, FastTable
is the name of the table associated to the BEGIN LOADING
command. Note the use of the python variableinputDataPlaceholder
, that must be defined by the user in a previous step. The value represents the Snowflake stage that could be internal or external as shown in the following table or as .
If you have any additional questions regarding this documentation, you can email us at .
: Element with missing dependencies.
: Removed next statement, not applicable in SnowFlake.