TPT Insert
Overview
The TPT (Teradata Parallel Transport) Insert Snap allows you to insert data from the input view by executing the script generated using the mapped input field provided by the user.
The Snap inserts the data with the values provided in the input view and provides the console output and status code on the output view for any downstream Snap checking for successful execution.
Queries produced by the Snap have the format:
INSERT INTO "ADW_SNAPL"."employee1" ("empno","empname","sal") VALUES (:"empno",:"empname",:"sal");
- This is a Write-type Snap.
Does not support Ultra Tasks
Prerequisites
TPT Snaps (TPT Insert, TPT Update, TPT Delete, TPT Upsert and TPT Load) use the tbuild utility for the respective operations.
In order to use these Snaps in the pipelines, the respective TPT utilities should be installed/available on the Snapplexes.
Basic steps for installing the TPT utilities:
Procedure to install the Teradata tools and utilities:
- Download the Teradata Tools and Utilities base such as TTU 16.20.25.00 Linux - Base 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.
Snap views
| Type | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input |
This Snap has at most one document input view. Expected input: A stream of documents to be loaded into the table. Each input document contains values for one record in the table. |
|
| Output |
This Snap has at most one document output view. Expected output: A single document containing the console output, return status from tbuild and the script which the Snap submitted to tbuild. |
|
| Learn more about Error handling. | ||
Snap settings
- 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.
| 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: TPT Insert |
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 insert records into.
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 |
TBUILD location
String/Expression |
Location of the tbuild application.
Note: The location will be on the Snapplex.
Default value: N/A Example: /usr/bin/tbuild |
Fetch metadata delay (seconds)
Integer/Expression |
The wait time in seconds to be used before fetching metadata to avoid conflicts while performing Teradata parallel executions in a pipeline.
Default value: 0 Example: 5 |
Snap execution
Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
|