Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Write

Description:

The TPT Load Snap uses the 'tbuild' command installed in the Operating System to load data into empty tables. Teradata tbuild program should be installed on the Snaplex where the Snap is being executed. The Snap generates a script based on the field mapping which is executed using the tbuild program The Snap also captures the output generated from the tbuild program and writes to the OUT field in the output document.

  • Expected downstream Snaps: Any Snap with a 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.
  • Expected output: A single document containing the console output, return status from tbuild and the script which the Snap submitted to tbuild.


Prerequisites:

TPT Snaps (TPT Insert, TPT Update, TPT Delete, TPT  Upsert and TPT Load) uses 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. 

Note

All the required TPT utilities must be installed on the node where JCC is running or the Snap simply executes but may not perform the operation. Any utility/library file missing on the node may cause the Snap to perform a failed operation.


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 tbuild or fastload is already available in the OS path then the corresponding TPT Snap can call the utility, however, if these binaries are not available in the OS path, then we need to provide the absolute path of the respective binary in the Snap.


Support and limitations:

To support UTF-8 in TPT Load Snap:

  • Enter the CHARSET=UTF8 under Url properties in Teradata account.
  • Create the text-type columns in the target table as UNICODE. For example, CREATE TABLE <target table name> (field2 VARCHAR(100) CHARACTER SET UNICODE).
  • TBUILD utility used by TPT Load Snap limits the size of the text-type columns to 32,000. For example, for LONG VARCHAR column, the input values should be less than or equal to 32,000 bytes. If this limit is exceeded, TBUILD throws an exception and TPT Load Snap writes the error to the error view. If input strings have single-byte special characters from 0x90 to 0xFF, those characters are counted as two bytes each.
Account: 

This Snap uses account references created on the Accounts page of  SnapLogic Manager to handle access to this endpoint. See Configuring Teradata Database Accounts for information on setting up this type of account.

Views:


InputThis Snap has two input views but by default it has one input view.
You can add a second view for metadata for the table as a document so that the table is created in MySQL with a similar schema as the source table. This schema is usually from the second output of a database Select Snap. If the schema is from a different database, the data types might not be properly handled.
Output

This Snap has one output view. The output view produces three output fields, the Script, Status and the 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, a number of records inserted and a number of records rejected.
  • OUT: Specifies the output text/data captured from the execution of the FastLoad program.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.


Settings

Label*

Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Schema name



Specify 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: None
Example: SYS

Table name*

Specify the 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: None
Example: people

Create table if not present
 

Multiexcerpt include macro
nameME_Create_Table_Automatically_2_Inputs
pageRedshift - Bulk Load

Default value: Not selected 

TBUILD location
 

Specify 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: None 

Write error table records to error view 

Select this check box to write all the records from the error tables to an error view after a fast load execution.  

Default value: Not selected 

Fetch metadata delay (seconds)
 

Specify 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 

Delete table data if present

Select this check box to delete the table data if present.

If selected, the data will be deleted from the table before loading.

If not selected, it displays an error to ensure the table is empty and not locked.

Default value: Not selected

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute

Example

This pipeline passes values into a table on TPT and writes the records to an output view.


1. The JSON Generator Snap passes the input values to the TPT table  via the Mapper Snap. 


 


2. The upstream Mapper Snap maps the values to be added to the records on TPT table. 



3. The TPT Load Snap loads the data into the table INTERGERtable.

Note the Fetch metadata delay has been set to 5 secs, which means the Snap waits for 5 seconds before fetching the metadata. This value should be set to a proper value to avoid conflicts while performing Teradata parallel executions in a pipeline. For example, where one Snap is trying to create a table and the next Snap is trying to access the table even before the table is created, or, the Snap is trying to write the records to the output view even before the data is recorded onto the table (even before the previous Snap finishes its job).



4. The successful execution of the pipeline displays the below output for the TPT Load Snap: 



The Teradata Execute Snap writes the records to the output view as below: 


 


Insert excerpt
Teradata Snap Pack
Teradata Snap Pack
nopaneltrue