Teradata FastLoad

Overview

The Teradata FastLoad Snap loads data to a Teradata table using the FastLoad utility.

Basic steps for installing the TPT utilities

Procedure to install the Teradata tools and utilities:

  • Download the Teradata Tools and Utilities base such as TeradataToolsAndUtilitiesBase__Linux_i386-x8664.15.10.06.00.tar.gz for Linux environment.
  • If the OS is 64 bit, install 32 bit support packages on the environment and also any further dependencies.
  • Install the Teradata Tools and Utilities (that includes tbuild, fastload, mload etc).
  • The default installation also configures the PATH in the OS.

Flow: If the tbuild or fastload is already available on the OS path then the corresponding TPT Snap can invoke the required utility, however, if these binaries are not available on the OS path, then we need to provide the absolute path of the respective binary in the Snap.

Limitations

When the upstream Snap passes empty strings as two consecutive delimiter characters, this Snap inserts null values into the corresponding fields of the table in the Teradata database. Also, if the last character in a record is a delimiter character, and if there is at least one more field to be processed, this Snap inserts null value in the field corresponding to the next one to be processed.

See Null Fields section in the Teradata documentation for more information.

Known issues

When the Teradata FastLoad Snap pauses, both the target and error tables get locked.

Workaround: You must manually drop these tables before retrying the fast-load job.

Snap views

Type Description Examples of upstream and downstream Snaps
Input

This Snap has at most two document input views. None or documents with values to evaluate expression properties in the Snap. Each input document triggers one execution of the script.

Output

This Snap has one output view. A single document containing the console output and return status from the external Teradata application for each input document. The output view produces three output fields: Script, Status, and Out.

  • SCRIPT: Specifies the script generated by the Snap and will be executed in the OS (the password will be masked).
  • STATUS: Specifies the status after executing the Snap (produced from the FastLoad execution). The status contains the number of records read, duplicated, inserted, dropped (because of error count and unique violation), and the error tables 1 and 2.
  • OUT: Specifies the output text/data captured from the execution of the FastLoad program.
Learn more about Error handling.

Snap settings

Legend:
  • Expression icon (): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field/Field set Description
Label

String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: Teradata FastLoad

Schema name

String/Expression/ Suggestion

The database schema name. In case it is not defined, the suggestion for the table name will retrieve all the table names of all the schemas. The property is suggestible and will retrieve available database schemas during suggest values.

Note: The values can be passed using the pipeline parameters but not the upstream parameter.

Default value: N/A

Example: SYS

Table name

String/Expression/ Suggestion

Required. Name of the table to execute a select query on.

Note: The values can be passed using the pipeline parameters but not the upstream parameter.

Default value: N/A

Example: people

Create table if not present

Checkbox

Whether the table should be automatically created if not already present.

Default value: Deselected

FastLoad absolute path

String/Expression

The absolute path for FastLoad command. If this field is left blank then the Snap tries to load the Fastload command from the Operating System.

Default value: N/A

Example: /usr/bin/fastload

Checkpoint size

Integer/Expression

Required. Value that specifies the number of rows transmitted to the Teradata Database between checkpoints using the CHECKPOINT. If the value is set to 0, then the checkpoint is not enabled during Fastload execution.

Default value: 0

Example: 1000

Write error table records to error view

Checkbox

Writes all the records from error tables to an error view after a Fastload execution is completed.

Default value: Deselected

Query band

String/Expression

Specify the name-value pairs to use in the session's generated query band statement. The query band is passed to the Teradata database as a list of name-value pairs separated by semi-colons.

Default value: N/A

Example: ProjectName=dstage1;user=test;

Snap execution

Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.

Troubleshooting

Error Cause Resolution
SnapDataException The Snap loads records with value more than the data type size. Manually drop the tables and retry.
Failure: TPT script failed to execute

error code: 8

The Snap is unable to read the Fastload absolute path.

Leave the field blank or update the Fastload absolute path with .exe extension to prevent your pipeline from failing.

For example, if you used /usr/bin/fastload as the Fastload absolute path, change it to /usr/bin/fastload.exe.

Failure: Failed to execute query

error code: 5992

A syntax error was found in the QUERY_BAND.

Check that the query band is in the form specified in the Query band field above.

For example, if you used priority=1;workload=high in the Query band, add a semi-colon and update the value to priority=1;workload=high;.