392
Teradata Parallel Transporter Reference Release 14.00 B035-2436-071A June 2012

Parallel... · Teradata Parallel Transporter Reference 3 Preface Purpose This book provides reference information about the components of Teradata Parallel Transporter (Teradata PT),

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

  • Teradata Parallel TransporterReference

    Release 14.00B035-2436-071A

    June 2012

  • The product or products described in this book are licensed products of Teradata Corporation or its affiliates.

    Teradata, Active Enterprise Intelligence, Applications-Within, Aprimo, Aprimo Marketing Studio, Aster, BYNET, Claraview, DecisionCast, Gridscale, Managing the Business of Marketing, MyCommerce, Raising Intelligence, Smarter. Faster. Wins., SQL-MapReduce, Teradata Decision Experts, "Teradata Labs" logo, "Teradata The Best Decision Possible" logo, "Teradata Raising Intelligence" logo, Teradata Source Experts, WebAnalyst, and Xkoto are trademarks or registered trademarks of Teradata Corporation or its affiliates in the United States and other countries.

    Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc.

    AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.

    Axeda is a registered trademark of Axeda Corporation. Axeda Agents, Axeda Applications, Axeda Policy Manager, Axeda Enterprise, Axeda Access, Axeda Software Management, Axeda Service, Axeda ServiceLink, and Firewall-Friendly are trademarks and Maximum Results and Maximum Support are servicemarks of Axeda Corporation.

    Data Domain, EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.

    GoldenGate is a trademark of Oracle.

    Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.

    Intel, Pentium, and XEON are registered trademarks of Intel Corporation.

    IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation.

    Linux is a registered trademark of Linus Torvalds.

    LSI is a registered trademark of LSI Corporation.

    Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United States and other countries.

    NetVault is a trademark or registered trademark of Quest Software, Inc. in the United States and/or other countries.

    Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries.

    Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates.

    QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation.

    SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc.

    SPARC is a registered trademark of SPARC International, Inc.

    Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States and other countries.

    Unicode is a registered trademark of Unicode, Inc. in the United States and other countries.

    UNIX is a registered trademark of The Open Group in the United States and other countries.

    Other product and company names mentioned herein may be the trademarks of their respective owners.

    THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED ON AN "AS-IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. IN NO EVENT WILL TERADATA CORPORATION BE LIABLE FOR ANY INDIRECT, DIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS OR LOST SAVINGS, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    The information contained in this document may contain references or cross-references to features, functions, products, or services that are not announced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features, functions, products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions, products, or services available in your country.

    Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updated without notice. Teradata Corporation may also make improvements or changes in the products or services described in this information at any time without notice.

    To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this document. Please email: [email protected].

    Any comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed non-confidential. Teradata Corporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform, create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, Teradata Corporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purpose whatsoever, including developing, manufacturing, or marketing products or services incorporating Feedback.

    Copyright © 1999-2012 by Teradata Corporation. All Rights Reserved.

    mailto:[email protected]

  • Teradata Parallel Transporter Reference 3

    Preface

    Purpose

    This book provides reference information about the components of Teradata Parallel Transporter (Teradata PT), a Teradata® Tools and Utilities product. Teradata Tools and Utilities is a group of client products designed to work with the Teradata Database.

    Teradata PT provides high-performance data extraction, loading, and updating operations for the Teradata Database.

    Audience

    This book is intended for use by:

    • System and application programmers

    • System administrators

    • Database administrators

    • Database developers

    • System operators

    • Other database specialists using Teradata PT

    Supported Releases

    This book applies to the following releases:

    • Teradata Database 14.0

    • Teradata Tools and Utilities Release 14.00

    • Teradata Parallel Transporter 14.00

    To locate detailed supported-release information:

    1 Go to http://www.info.teradata.com.

    2 Under Online Publications, click General Search.3 Type 3119 in the Publication Product ID box.4 Under Sort By, select Date.5 Click Search.6 Open the version of the Teradata Tools and Utilities ##.# Supported Platforms and Product

    Versions spreadsheet associated with this release.

    http://www.info.teradata.com/

  • PrefacePrerequisites

    4 Teradata Parallel Transporter Reference

    The spreadsheet includes supported Teradata Database versions, platforms, and product release numbers.

    Prerequisites

    The following prerequisite knowledge is required for this product:

    • Computer technology and terminology

    • Database management systems

    • SQL and Teradata SQL

    • Basic concepts and facilities of the Teradata Database server

    • Connectivity software, such as ODBC or CLI

    • Teradata utilities that load and retrieve data

    Changes to This Book

    The following changes were made to this book in support of the current release. Changes since the last publication are marked with change bars. For a complete list of changes to the product, see Teradata Tools and Utilities Release Definition associated with this release.

    Some new functions and features for this release of Teradata PT might not be documented in this manual. New features and functions are also documented in the other manuals listed in “Additional Information” on page 7.

  • PrefaceChanges to This Book

    Teradata Parallel Transporter Reference 5

    Date and Release Description

    June 201214.00

    The Export operator supports 64-bit row count variables. Notify Exit Routines for this operator have been updated.

    The Update operator supports 64-bit row count variables. Notify Exit Routines for this operator have been updated.

    The Load operator supports 64-bit row count variables. Notify Exit Routines for this operator have been updated.

    The Stream operator supports 64-bit row count variables. Notify Exit Routines for this operator have been updated.

    Documented the -r checkpointDirectory option of the tbuild command.

    Moved the chapter on operational metadata from this book to the Teradata PT User Guide.

    Removed references to ValidUTF8 and ReplacementUTF8Char

    Clarified documentation of the DataConnector operator TextDelimiter attribute.

    Clarified documentation of the Load and Update operator ErrorTable2 attribute.

    Teradata PT supports loading DataTime data using the Schema-defined VARDATE column data type.

    Teradata PT ODBC operator supports larger buffer size.

    Clarified the use of the Export operator in multiple SELECT statements.

    Updated the DEFINE SCHEMA statement and the APPLY statement for Teradata PT simplified syntax (called “Simplicity”).

    Added two examples of DEFINE SCHEMA statement syntax to the list of deprecated Teradata PT syntax.

    The Data Definition Language (DDL) operator supports 1024 SQL statement groups in the APPLY statement.

    Clarified end-of-record markers for text formatted data.

    The functionality of the DataConnector operator attributes AcceptExcessColumns, AcceptMissingColumns, and TruncateColumnData has been expanded to allow for not saving the error record in the error record file.

  • PrefaceChanges to This Book

    6 Teradata Parallel Transporter Reference

    November 201114.00

    Added information on Teradata PT operators formerly in the Teradata PT User Guide.

    Added documentation of (1) the Notify Exit Routines, (2) Teradata DatabaseTeradata considerations when running a Teradata PT job, (3) extended character sets, and (4) operational metadata to this book. Documentation was formerly in the Teradata PT User Guide.

    The DDL (Data Definition Language) operator supports Stored Procedure DDL statements.

    Teradata PT supports NUMBER data type.

    Teradata PT supports DBS ARRAY data type.

    Documented how to specify ARRAY data types in a DEFINE SCHEMA statement.

    Teradata PT supports the dash when the character set being used is UTF-8 or UTF-16.

    DataConnector operator validates UTF8 and Extended Ascii characters.

    The DataConnector operator supports the following two attributes: TrimChar and TrimColumns. These replace the following attributes: TrimLeadingBlanks, TrimLeadingChar, TrimTrailingBlanks, TrimTrailingChar. The name of TruncateLongCols has been changed to TruncateColumns.

    The DataConnector operator supports the following attribute: ReplacementUTF8Char.

    The DataConnector operator supports Gzip and Zip files.

    The VigilSortField attribute of the DataConnector operator can be used for a batch directory scan.

    Documented limitations when using the ODBC operator on HP-UX Itanium.

    Deleted the statement, “If obsolete syntax is present in an existing script, the compiler ignores the syntax,” from the table of deprecated syntax in appendix B.

    Documentation of the NoSpool attribute of the Export operator clarified.

    Clarified the Teradata PT is optimized and certified to work only with DataDirect/Progress ODBC drivers.

    Added appendix D (“Teradata PT Publications”).

    Date and Release Description

  • PrefaceAdditional Information

    Teradata Parallel Transporter Reference 7

    Additional Information

    Additional information that supports this product and the Teradata Tools and Utilities is available at the following web sites.

    August 201114.00

    Teradata PT job scripts support operator templates.

    New Schema Mapping operator enables users to verify that Teradata PT job schema definitions correctly describe input data.

    Teradata PT Easy Loader documentation revised.

    DataConnector operator supports VARTEXT rows with less columns than the defined schema for that operator.

    Added the macro char set specification to the DEFINE SCHEMA statement.

    Documented JOB TRACELEVEL (enhancement to External Command Interface [twbcmd]).

    Added a new OS Command operator attribute to support IBM z/OS system calls.

    The restriction that jobName must be the last tbuild command option has been lifted.

    Teradata PT notify exit samples on MVS have been revised.

    VARCHAR and VARBYTE data with a length less than or equal to the defined length in the DEFINE SCHEMA definition is now supported.

    Description of the Update operator ErrorLimit attribute revised.

    Documented the new tbuild argument: -o

    SQL Selector operator supports multiple SELECT statements.

    Date and Release Description

    Type of Information Description Source

    Release overview

    Late information

    Use the Release Definition for the following information:

    • Overview of all the products in the release

    • Information received too late to be included in the manuals

    • Operating systems and Teradata Database versions that are certified to work with each product

    • Version numbers of each product and the documentation for each product

    • Information about available training and support center

    1 Go to http://www.info.teradata.com/.2 Under Online Publications, click General Search3 Type 2029 in the Publication Product ID box.4 Click Search. 5 Select the appropriate Release Definition from

    the search results.

    http://www.info.teradata.com/

  • PrefaceAdditional Information

    8 Teradata Parallel Transporter Reference

    Additional product information

    Use the Teradata Information Products web site to view or download specific manuals that supply related or additional information to this manual.

    1 Go to http://www.info.teradata.com/.2 Under the Online Publications subcategory,

    Browse by Category, click Data Warehousing.3 Do one of the following:

    • For a list of Teradata Tools and Utilities documents, click Teradata Tools and Utilities, and then select an item under Releases or Products.

    • Select a link to any of the data warehousing publications categories listed.

    Specific books related to Teradata PT are as follows:

    • Teradata Tools and Utilities Access Module Programmer GuideB035-2424

    • Teradata Tools and Utilities Access Module ReferenceB035-2425

    • Teradata Parallel Transporter Application Programming Interface Programmer GuideB035-2516

    • Teradata Parallel Transporter Operator Programmer GuideB035-2435

    • Teradata Parallel Transporter Quick Start GuideB035-2501

    • Teradata Parallel Transporter ReferenceB035-2436

    • Teradata Parallel Transporter User GuideB035-2445

    • Teradata Tools and Utilities for IBM z/OS Installation GuideB035-3128

    • Teradata Tools and Utilities Installation Guide for Microsoft WindowsB035-2407

    • Teradata Tools and Utilities for Red Hat Enterprise Linux Installation Guide B035-3121

    • Teradata Tools and Utilities for SUSE Linux Installation GuideB035-3122

    • Teradata Tools and Utilities for s390x Linux Installation GuideB035-3123

    • Teradata Tools and Utilities for HP-UX Installation GuideB025-3124

    Type of Information Description Source

    http://www.info.teradata.com/

  • PrefaceAdditional Information

    Teradata Parallel Transporter Reference 9

    • Teradata Tools and Utilities for IBM AIX Installation Guide B035-3125

    • Teradata Tools and Utilities for Oracle Solaris on AMD Opteron Systems Installation GuideB035-3126

    • Teradata Tools and Utilities for Oracle Solaris on SPARC Systems Installation GuideB035-3127

    CD-ROM images Access a link to a downloadable CD-ROM image of all customer documentation for this release. Customers are authorized to create CD-ROMs for their use from this image

    1 Go to http://www.info.teradata.com/.2 Under the Online Publications subcategory,

    Browse by Category, click Data Warehousing.3 Click CD-ROM Images.4 Follow the ordering instructions.

    Ordering information for manuals

    Use the Teradata Information Products web site to order printed versions of manuals.

    1 Go to http://www.info.teradata.com/.2 Under Print & CD Publications, click How to

    Order.3 Follow the ordering instructions.

    General information about Teradata

    The Teradata home page provides links to numerous sources of information about Teradata. Links include:

    • Executive reports, case studies of customer experiences with Teradata, and thought leadership

    • Technical information, solutions, and expert advice

    • Press releases, mentions and media resources

    • Go to Teradata.com/t/resources.

    • Select a link.

    Type of Information Description Source

    http://www.info.teradata.com/http://www.info.teradata.com/http://www.teradata.com/t/resources

  • PrefaceAdditional Information

    10 Teradata Parallel Transporter Reference

  • Teradata Parallel Transporter Reference 11

    Table of Contents

    Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

    Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

    Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

    Supported Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

    Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4

    Changes to This Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4

    Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

    SECTION 1 Commands and Statements

    Chapter 1: Teradata PT Utility Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    tbuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    tdload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    tdlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    tlogview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    twbcmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

    twbkill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    twbrmcp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    twbstat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    Chapter 2: Object Definitions and the APPLY Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    Object Definition Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    Syntax for Attribute Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    DEFINE JOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

  • Table of Contents

    12 Teradata Parallel Transporter Reference

    Job Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64

    Example: Job with Single APPLY Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64

    Job Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65

    Example: Job Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65

    DEFINE SCHEMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83

    Examples of DEFINE SCHEMA Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83

    DEFINE OPERATOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86

    DEFINE OPERATOR Statement: Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90

    APPLY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92

    SECTION 2 Teradata PT Operators

    Chapter 3: DataConnector Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105

    DataConnector Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105

    Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124

    FileName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124

    Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125

    OpenMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126

    TextDelimiter and EscapeTextDelimiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126

    Rules for Quoted Delimited Data Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127

    Operational Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128

    File Size Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128

    z/OS Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128

    End of Record Markers for Text Formatted Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128

    DataConnector Operator Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129

  • Table of Contents

    Teradata Parallel Transporter Reference 13

    Chapter 4: DDL Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

    DDL Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

    The DDL Operator Function in a Teradata PT Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

    Supported SQL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

    Specifying DDL Statements in the Teradata PT APPLY Statement . . . . . . . . . . . . . . . . 141

    Grouping SQL Statements in the Teradata PT APPLY Statement . . . . . . . . . . . . . . . . . 141

    Operational Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

    Checkpointing and Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

    Chapter 5: Export Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    Export Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    The Export Operator Function in a Teradata PT Job. . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    FastExport Utility and the Export Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

    SelectStmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

    NoSpool Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

    Limits on Export Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

    Checkpointing and Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

    Using the Large Decimal Teradata Database Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

    Operational Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

    Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

    Sessions and Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

    Multiple Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

    Exporting VARBYTE Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

  • Table of Contents

    14 Teradata Parallel Transporter Reference

    Chapter 6: FastExport OUTMOD Adapter Operator . . . . . . . . . . . . . . . . . . . . . . . . . .163

    FastExport OUTMOD Adapter Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163

    Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168

    Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169

    Operational Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169

    Chapter 7: FastLoad INMOD Adapter Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171

    FastLoad INMOD Adapter Operator Capabilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171

    Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174

    Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175

    Operational Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175

    Chapter 8: Load Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177

    Load Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177

    Load Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177

    The Load Operator Function in a Teradata PT Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177

    Load Operation Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178

    FastLoad Utility and the Load Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178

    Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191

    LogTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191

    ErrorTable1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191

  • Table of Contents

    Teradata Parallel Transporter Reference 15

    ErrorTable2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

    Auto-Generation of Error Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

    Duplicate Rows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

    ErrorLimit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

    Staged Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

    Operational Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

    Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

    Space Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

    Sessions and Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

    Limits on Load Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

    Checkpointing and Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

    Load Operator as Standalone Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

    Chapter 9: MultiLoad INMOD Adapter Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

    MultiLoad INMOD Adapter Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

    Input Record Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

    Chapter 10: ODBC Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

    ODBC Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

    The ODBC Operator Function in a Teradata PT Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

    SelectStmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

    DataBlockSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

    Multiple Parallel Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

    Rules for Handling Decimal Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

    Using ODBC Operator with Oracle DATE Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

  • Table of Contents

    16 Teradata Parallel Transporter Reference

    Configuring ODBC Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211

    Using the ODBC Operator on HP-UX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212

    Using the ODBC Operator on IBM z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212

    ODBC Operator and Teradata Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215

    Support for NUMBER Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215

    Operational Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215

    Checkpointing and Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215

    Chapter 11: OS Command Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217

    OS Command Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217

    The OS Command Operator Function in a Teradata PT Job . . . . . . . . . . . . . . . . . . . . . .217

    Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218

    Chapter 12: Schema Mapping Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223

    Schema Mapping Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223

    Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223

    Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224

    Attribute Relationships. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227

    Schema Mapping Output Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228

    DumpFieldsNoTrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228

    DumpFieldsWithTrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229

    DumpRecordsNoTrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229

    DumpRecordsWithTrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230

    FormatFields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230

    Chapter 13: SQL Inserter Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233

    SQL Inserter Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233

    The SQL Inserter Operator Function in a Teradata Job Script . . . . . . . . . . . . . . . . . . . . .233

    SQL Inserter Operator and the Load Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234

  • Table of Contents

    Teradata Parallel Transporter Reference 17

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

    Support for LOBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

    Data Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

    Data Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

    Operational Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

    Checkpointing and Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

    Chapter 14: SQL Selector Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

    SQL Selector Operator Capabilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

    SQL Selector Operator and the Export Operator Compared . . . . . . . . . . . . . . . . . . . . . 241

    Defining an SQL Selector Operator in a Teradata PT Script . . . . . . . . . . . . . . . . . . . . . . 242

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

    SelectStmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

    LOB Loading Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

    Using the Large Decimal Teradata Database Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

    Operational Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

    Checkpointing and Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

    Chapter 15: Stream Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

    Stream Operator Capabilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

    The Stream Operator Function in a Teradata PT Script . . . . . . . . . . . . . . . . . . . . . . . . . 257

    TPump Utility and the Stream Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

    LogTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

    ErrorTable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

  • Table of Contents

    18 Teradata Parallel Transporter Reference

    DML Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278

    SERIALIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278

    Robust and Non-Robust Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279

    Recovery Logic and Overhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280

    Data Quality Affects Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281

    Statement Packing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281

    Array Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282

    Latency Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282

    MacroCharSet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283

    Operational Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284

    NoPI Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284

    Space Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284

    Sessions and Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284

    Checkpointing and Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .285

    Dropped Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .285

    DML Option Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286

    Temporal Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286

    Chapter 16: Update Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287

    Update Operator Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287

    Update Operator as Standalone Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287

    The Update Operator Function in a Teradata PT Job Script . . . . . . . . . . . . . . . . . . . . . . .287

    Functional Description of the Update Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288

    Update Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288

    MultiLoad Utility and the Update Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289

    Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290

    Required Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291

    Required and Optional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292

    Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304

    LogTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304

    TargetTable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305

    ErrorTable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305

    WorkTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307

    Auto-Generation of Error and Work Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307

    Job Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308

    Checkpointing and Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308

    Upserts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309

    AMP Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309

  • Table of Contents

    Teradata Parallel Transporter Reference 19

    VARCHAR ARRAY Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

    Operational Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

    Space Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

    Sessions and Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

    Limits on Update Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

    Delete Task Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

    Using Delete Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

    Why Choose the Delete Task Option? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

    Example 1: Delete Task Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

    Example 2: Delete Task Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

    SECTION 3 Additional Topics

    Chapter 17: Notify Exit Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

    Notify Exit Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

    Export Operator Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

    Load Operator Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325

    Update Operator Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

    Stream Operator Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332

    DataConnector Operator Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336

    Using Notify Exit Routines to Monitor Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

    Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

    Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

    Compiling and Linking Notify Exit Routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

    UNIX Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

    Windows Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344

    Chapter 18: Advanced Teradata Database Considerations . . . . . . . . . . . . . . . . . 347

    Query Banding Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

    Large Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

    Defining LOB Data in a Teradata PT Schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

    Inline Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

    Deferred Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

  • Table of Contents

    20 Teradata Parallel Transporter Reference

    Moving LOB Data from one Teradata Database Table to Another. . . . . . . . . . . . . . . . . .349

    Loading LOB Data into a Teradata Database Table from External Data Files . . . . . . . . .350

    Extracting LOB Data from Teradata Database Tables and Writing LOB Data to an External Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350

    User Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350

    Limitations on LOB Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351

    Data Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352

    Chapter 19: Extended Character Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355

    Using Extended Character Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355

    Character Set Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355

    Specifying an Extended Character Set in a Teradata PT Job Script. . . . . . . . . . . . . . . . . .356

    Extended Session Character Set Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357

    UTF16 Support - Specifying Unicode in tbuild Command. . . . . . . . . . . . . . . . . . . . . . . .357

    Options for Specifying UTF8 and UTF16 in a Job Script. . . . . . . . . . . . . . . . . . . . . . . . . .358

    Using LONG VARCHAR with Unicode Character Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359

    Appendix A: How to Read Syntax Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .361

    Syntax Diagram Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .361

  • Table of Contents

    Teradata Parallel Transporter Reference 21

    Appendix B: Deprecated Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

    Appendix C: Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371

    Appendix D: Teradata PT Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375

    Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377

    Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

  • Table of Contents

    22 Teradata Parallel Transporter Reference

  • Teradata Parallel Transporter Reference 23

    List of Figures

    Figure 1: DDL Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

    Figure 2: Export Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    Figure 3: How the Teradata Database Large Decimal Feature Affects Job Continuation . . 161

    Figure 4: FastExport OUTMOD Adapter Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . 163

    Figure 5: FastLoad INMOD Adapter Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

    Figure 6: Load Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

    Figure 7: MultiLoad INMOD Adapter Operator as Producer Operator . . . . . . . . . . . . . . . . 197

    Figure 8: MultiLoad INMOD Adapter Operator as Filter Operator . . . . . . . . . . . . . . . . . . . 198

    Figure 9: ODBC Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

    Figure 10: OS Command Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

    Figure 11: Schema Mapping Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

    Figure 12: SQL Inserter Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

    Figure 13: SQL Selector Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

    Figure 14: How the Teradata Database Large Decimal Feature Affects Job Continuation . 254

    Figure 15: Stream Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

    Figure 16: Update Operator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

  • List of Figures

    24 Teradata Parallel Transporter Reference

  • Teradata Parallel Transporter Reference 25

    List of Tables

    Table 1: Teradata PT Object Definitions Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    Table 2: Required Syntax for the DataConnector Operator . . . . . . . . . . . . . . . . . . . . . . . . . . 105

    Table 3: DataConnector Attribute Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

    Table 4: Valid FileName Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

    Table 5: Required Syntax for the DDL Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    Table 6: DDL Operator Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

    Table 7: Export Operator Supported Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

    Table 8: Required Syntax for the Export Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

    Table 9: Export Operator Attribute Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

    Table 10: SELECT Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

    Table 11: Required Syntax for the FastExport OUTMOD Adapter Operator. . . . . . . . . . . . 164

    Table 12: FastExport OUTMOD Adapter Operator Attribute Definitions . . . . . . . . . . . . . . 165

    Table 13: Required Syntax for the FastLoad INMOD Adapter Operator . . . . . . . . . . . . . . . 172

    Table 14: FastLoad INMOD Adapter Operator Attribute Descriptions . . . . . . . . . . . . . . . . 173

    Table 15: Load Operator Supported Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

    Table 16: Load Operator Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

    Table 17: Required Syntax for the MultiLoad INMOD Adapter Operator . . . . . . . . . . . . . . 198

    Table 18: MultiLoad INMOD Adapter Operator Attribute Descriptions . . . . . . . . . . . . . . . 199

    Table 19: Required Syntax for the ODBC Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

    Table 20: ODBC Operator Attribute Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

    Table 21: Required Syntax for the OS Command Operator . . . . . . . . . . . . . . . . . . . . . . . . . . 218

    Table 22: OS Command Operator Attribute Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

    Table 23: Required Syntax for the Schema Mapping Operator . . . . . . . . . . . . . . . . . . . . . . . 224

    Table 24: Schema Mapping Operator Attribute Descriptions . . . . . . . . . . . . . . . . . . . . . . . . 225

    Table 25: Relationship Between DumpFieldsNoTrans and DumpFieldsWithTrans . . . . . . 227

    Table 26: Relationship Between DumpRecordsNoTrans and DumpRecordsWithTrans . . 227

    Table 27: Relationship Between FormatFields and the Dump Attributes . . . . . . . . . . . . . . . 228

    Table 28: Relationship Between RecordCount and AllRecords. . . . . . . . . . . . . . . . . . . . . . . 228

    Table 29: Required Syntax for the SQL Inserter Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

    Table 30: SQL Inserter Operator Attribute Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

    Table 31: Required Syntax for the SQL Selector Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

    Table 32: SQL Selector Attribute Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

  • List of Tables

    26 Teradata Parallel Transporter Reference

    Table 33: Stream Operator Feature Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258

    Table 34: Required Syntax for the Stream Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .260

    Table 35: Stream Operator Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264

    Table 36: Update Operator Feature Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290

    Table 37: Required Syntax for the Update Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291

    Table 38: Update Operator Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295

    Table 39: AMP Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310

    Table 40: Export Operator Notify Event Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322

    Table 41: Export Operator Events That Create Notifications. . . . . . . . . . . . . . . . . . . . . . . . . .324

    Table 42: Load Operator Notify Event Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325

    Table 43: Load Operator Events That Create Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . .327

    Table 44: Update Operator Notify Event Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328

    Table 45: Update Operator Events That Create Notifications . . . . . . . . . . . . . . . . . . . . . . . . .331

    Table 46: Stream Operator Notify Event Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332

    Table 47: Stream Operator Events that Create Notifications . . . . . . . . . . . . . . . . . . . . . . . . . .335

    Table 48: DataConnector Operator Event Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337

    Table 49: z/OS Notify Exit Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340

    Table 50: UNIX Operating System Syntax for Notify Exit Routines . . . . . . . . . . . . . . . . . . . .340

    Table 51: HP-UX Syntax for Notify Exit Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341

    Table 52: Linux Syntax for Notify Exit Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342

    Table 53: IBM AIX Syntax for Notify Exit Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343

    Table 54: z/OS Syntax for Notify Exit Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344

    Table 55: Specifying Unicode character sets in a Teradata PT Job Script . . . . . . . . . . . . . . . .359

    Table 56: Syntax Changes for This Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367

  • Teradata Parallel Transporter Reference 27

    SECTION 1 Commands and Statements

  • Section 1: Commands and Statements

    28 Teradata Parallel Transporter Reference

  • Teradata Parallel Transporter Reference 29

    CHAPTER 1

    Teradata PT Utility Commands

    This chapter describes Teradata PT command line utility commands.

    Command Syntax

    The following sections provide the syntax and a brief description of the options for each Teradata PT utility command.

    This command... Does the following:

    tbuild Defines and executes a Teradata PT job.

    tdload Loads data from a delimited file into a Teradata table without requiring a job script.

    tdlog Extracts the logs produced m running a Teradata PT job.

    tlogview Displays the contents of the log files produced from running a Teradata PT job.

    twbcmd Allows the modification of an active Teradata PT job and the retrieval of job status.

    twbkill Terminates all Teradata PT tasks within an application.

    twbrmcp Removes all checkpoint files for a specified user ID or job name.

    twbstat Displays Teradata PT application status.

  • Chapter 1: Teradata PT Utility Commandstbuild

    30 Teradata Parallel Transporter Reference

    tbuild

    Purpose

    The tbuild command defines and executes Teradata PT job scripts. The job scripts must conform to Teradata PT syntax rules.

    Syntax

    The tbuild command takes as its primary argument the file containing the Teradata PT job script. You can specify tbuild options in any order.

    2436N009

    -C

    -f fileNametbuild

    valueK

    valueM

    -e characterSet

    value

    -l latencyInterval

    -j jobName

    -L jobLogDirectory

    -u jobVariables

    -v jobVariablesFile

    -z checkpointInterval

    -m statisticsInterval

    -n

    -o

    -t

    -V

    -R restartLimit

    -r checkpointDirectory

    -s jobstepIdentifier

    -h

    dsName

    sysoutClass

    DD:ddName-S

    -d

  • Chapter 1: Teradata PT Utility Commandstbuild

    Teradata Parallel Transporter Reference 31

    where:

    Syntax Element Description

    -C Option that provides a more even distribution of data to consumer operators by instructing producer operators and their underlying data streams to ship data blocks to target consumer operators in a cyclical or round-robin manner.

    By default, Teradata PT data streams send a block of data to the first ready/available consumer operator found in the producer's channel set array, only switching processes when the first consumer operator is too busy to accept more input. Using the -C option ensures that data are evenly distributed among consumer operators.

    -d Option that enables debug trace functions for all tasks.

    Using this option outputs trace messages and return codes of all internal functions invoked on behalf of tbuild. Internal error condition codes and trace messages are usually helpful for debugging issues occurring at the infrastructure level. However, when using this option along with the trace options provided by the operators, a full trace of the job can be obtained.

    If this option is not specified, the debug trace function is disabled.

    -e characterSet Option that specifies the character set encoding of the script. This option also ensures that files in big endian and little endian format are processed correctly regardless of the platform’s native encoding.

    If not specified, the default character set is 7-bit ASCII compatible on UNIX OS, Windows and EBCDIC on z/OS.

    -e characterSet is required if the job script is encoded in UTF16.

    All values are case insensitive and may be used with or without hyphens. That is, UTF16, UTF-16, utf16-be, and any similar notations are all valid. The following values are valid for characterSet:

    • UTF-16

    (Preferred notation) Endianess defaults to that of the client platform

    • UTF-8

    (Preferred notation) Specifying UTF-8 is optional. Specifying UTF-8 for a non-UTF-8 script generates an error. Endianess is irrelevant for UTF-8 encoding.

    • UTF-16LE

    (Preferred notation) Specifies a job script with little-endian encoding. If executed on a big endian platform, script encoding is converted to big-endian encoding before being executed. Not permitted as a client session character set name.

    • UTF-16BE

    (Preferred notation) Specifies a job script with big-endian encoding. If executed on a little-endian platform, script encoding is converted to little-endian encoding before being executed. Not permitted as a client character set name.

    -f fileName Option that specifies the Teradata PT job script file.

  • Chapter 1: Teradata PT Utility Commandstbuild

    32 Teradata Parallel Transporter Reference

    -L jobLogDirectory Option that enables redirecting log files to a specific location on a job-by-job basis. jobLogDirectory is the full path name of the directory in which the log file is to be stored.

    This feature is not supported on z/OS.

    -j jobName Optional job name, but strongly recommended so each job can have a unique checkpoint file. The default, if you do not enter a jobName, is the user name followed by a hyphen (“-”) and a generated Teradata PT job sequence number as follows:

    -Note: If multiple jobs are to be simultaneously run under the same logon session, specify a unique name for each job because each job must write its own checkpoint file. Without a unique name, concurrent jobs try to write to the same checkpoint file. This causes the jobs to fail.

    Syntax Element Description

  • Chapter 1: Teradata PT Utility Commandstbuild

    Teradata Parallel Transporter Reference 33

    -h value

    -h valueK

    -h valueM

    Option that specifies the size of the shared memory used among the processes of a Teradata PT job.

    Options include:

    • -h value, where value specifies the shared memory size in bytes and can range from 1, 048, 576 bytes to 134, 217, 728 bytes.

    • -h valueK, where valueK specifies the shared memory size in kilobytes and can range from 1024 K (1, 048, 576 bytes) to 131, 072 K (134, 217, 728 bytes).

    • -h valueM, where valueM specifies the shared memory size in megabytes and can range from 1M (1, 048, 576 bytes) to 128 M (134, 217, 728 bytes).

    For example,

    tbuild -h 9700KIf the -h option is not specified, Teradata PT allocates 10,000,000 bytes of shared memory.

    If the -h option is invalid, a warning message is issued, and Teradata PT allocates the default memory size of 10,000,000 bytes. The following message is issued if the -h option is invalid:

    • Message: The -h memory size is invalid, and will be ignored.

    Type: Warning

    Explanation: The memory size value is not numeric.

    Remedy: Correct the -h option value.

    If the value of the -h option falls outside of the allowed range, a warning is issued and the size is adjusted to the appropriate minimum or maximum value before allocation. The following messages are issued if the -h option is out of the allowed range:

    • Message: The -h memory size exceeds the maximum allowed value, and will be lowered to 134217728.

    Type: Warning

    Explanation: The memory size value exceeds the maximum allowed value.

    Remedy: Correct the -h option value.

    • Message: The -h memory size is less than the minimum allowed value, and will be raised to 1048576.

    Type: Warning

    Explanation: The memory size value is less than the minimum allowed value.

    Remedy: Correct the -h option value.

    -l latencyInterval Optional latency interval, specified in seconds, for flushing stale buffers. Latency interval is used exclusively with the Stream operator.

    If no value is specified, data is read from the data stream until its buffer is full. Then all buffered records are written to the Teradata Database.

    Syntax Element Description

  • Chapter 1: Teradata PT Utility Commandstbuild

    34 Teradata Parallel Transporter Reference

    -m statisticsInterval Option that specifies a time interval, in seconds, in which to collect statistical information about operators.

    If this option is not specified, no statistical information is collected.

    -n Option that specifies that the job can continue to run even if a job step returns an error.

    • If a job step receives a non-zero exit code, the job will continue.

    • If a step exits with a status of “failure” (exit code higher than 4), the subsequent steps will bypass the checkpoint file left by the previously failed step.

    The required syntax is:

    tbuild -f -nIf this option is not specified, the job will stop if a step fails.

    -o Option that writes the consumer private logs to standard output after a job completes.

    If the -o option is not specified, logs will not be written to standard output.

    -r checkpointDirectory Option that specifies that checkpoint files are to be stored in a directory called “CheckpointDirectory.”

    If the -r option is not specified, then checkpoint files will be stored in the default checkpoint directory that is defined in the Teradata PT configuration file.

    -R restartLimit Option that overrides the default value of five tries at automatic (job) restart.

    If you specify -R, enter a value or the system will reject the command and return an error.

    The restartLimit value can be any whole number greater than zero or equal to zero. The value zero prevents automatic job restart.

    Syntax Element Description

  • Chapter 1: Teradata PT Utility Commandstbuild

    Teradata Parallel Transporter Reference 35

    -s jobstepIdentifier Option that directs job execution to start at the specified job step.

    Job steps are identified by a job step name in a script or by an implicit job step number that corresponds to the physical order of job steps in a script, such as 1, 2, 3.

    The job will start at the specified job step, skipping over all job steps that come before it in the job script.

    This option also removes checkpoint files:

    • used by any skipped steps

    • used by a previous execution of the same job

    • that would have been carried forward because of a failure or premature termination of one or more of the preceding steps

    Since checkpoint files subject to these conditions are not valid for subsequent steps, the system will remove them before starting the step specified for the -s option.

    Note: The -s option formerly supported silent mode. Silent mode is no long available.

    -S DD:ddname

    -S dsName

    -S sysoutClass

    Option that enables tbuild to write both the private and public logs to a specified location (for z/OS platforms). Choose from the following logDestination options:

    • To specify a ddname: tbuild -S logDestinationwhere logDestination is DD:, the target ddname for the log file.

    • To specify a dsname: tbuild -S logDestination where logDestination is , the target dataset name for the logfile.

    Note: A fully qualified dataset name is indicated by enclosing the name in single quote marks.

    • To specify a SYSOUT class: tbuild -S logDestinationwhere logDestination is , the SYSOUT class for the log file.

    If the -S option is not specified, tbuild does not write the private or public log to a specified location. However, tbuild still writes the logs to the dataset referenced by the JOBLOG DD statement.

    -t Option that enables the trace option for all tasks.

    If this option is not specified, trace is disabled.

    Syntax Element Description

  • Chapter 1: Teradata PT Utility Commandstbuild

    36 Teradata Parallel Transporter Reference

    -u jobVariables Option that allows you to specify job variable values on the command line.

    Use this option to specify job variable assignments on the command line for the current execution of the job script.

    Note: There are multiple sources of job variable assignments within a job script, which are invoked in a priority order hierarchy. For more information, see “Job Variables” in Teradata Parallel Transporter User Guide.

    In the following example, UsrID and Pwd are defined as job variables and they are used to supply runtime values for the UserName and UserPassword attributes:

    ATTRIBUTES( VARCHAR UserName = @UsrID, VARCHAR UserPassword = @Pwd);The following command supplies runtime values for these job variables:

    tbuild -f scriptFileName -u "UsrID = 'John Doe', Pwd = 'ABC123' "

    -v jobVariablesFile Option that allows job variable values to be specified in an external file.

    This is similar to the -u option for assigning values at run time to job variables specified in a script, except that the variable values are stored in an external file that is referenced by tbuild through the following command:

    tbuild -f scriptFileName -v jobVariablesFileWhere jobVariableFile is a file which contains the values for substitution:

    UsrID = 'John Doe',Pwd = 'ABC123'

    -V Option that displays the Teradata PT version number without running a job.

    Do not use with any other option. The option works only on UNIX and Windows platforms.

    -z checkpointInterval Option that specifies a time interval, in seconds, between checkpoints.

    If this option is not specified, there will be no interval checkpointing, unless a checkpoint interval is specified in the job script.

    If a checkpoint interval is specified in both places, the -z option specification takes precedence.

    Syntax Element Description

  • Chapter 1: Teradata PT Utility Commandstdload

    Teradata Parallel Transporter Reference 37

    tdload

    Purpose

    The Teradata PT Easy Loader command, tdload, loads data into a Teradata Database table from a comma-delimited flat file or another Teradata Database table without requiring a Teradata PT job script to be written.

    Syntax

    tdload has the following syntax:

  • Chapter 1: Teradata PT Utility Commandstdload

    38 Teradata Parallel Transporter Reference

    -p password

    tdload -f fileName

    -t tableName

    -u userName

    jobName

    2436C075

    A

    A

    -c characterSet

    -d ‘delimiterCharacter’

    -f fileName

    -h tdpId

    -j jobVariablesFile

    -p password

    -S

    -t tableName

    -u userName

    -v

    -x

    --FileInstances number

    --help

    --LoadInstances number

    --SelectStmt “SELECT statement(s) ;”

    --SourceAccountId accountId

    --SourceFileName fileName

    --SourceInstances number

    --SourceMaxSessions number

    --SourceMinSessions number

    --SourceTable tableName

    --SourceTextDelimiter ‘delimiterCharacter’

    --SourceTdpId tdpId

    --SourceTraceLevel value

    --SourceUserName userName

    --SourceUserPassword password

    --SourceWorkingDatabase databaseName

    --TargetAccountId accountId

    --TargetErrorLimit number

    --TargetMaxSessions number

    --TargetMinSessions number

    --TargetTable tableName

    --TargetTdpId tdpId

    --TargetTraceLevel value

    --TargetUserName userName

    --TargetUserPassword password

    --TargetWorkingDatabase databaseName

  • Chapter 1: Teradata PT Utility Commandstdload

    Teradata Parallel Transporter Reference 39

    where jobOptions are:

    Syntax Element Description

    -c characterSet The character set encoding of the flat file. This option sets the client session character set.

    Specify this option if the flat file is not an ASCII file.

    -d "delimiterCharacter" The delimiter character used to separate the fields of the data records in the delimited format flat file.

    Note: The default delimiter character is a comma ('',''). This is different from the usage in Teradata PT scripts where the default delimiter character is the pipe character (''|''). You must specify this option if the delimiter character in your flat file is not a comma.

    -f fileName Required. The name of the flat file containing the data to be loaded.

    If you are not executing the tdload command in the directory where the flat file is stored, fileName must be a fully qualified flat file name.

    • The -f (or --SourceFileName) option and the --SourceTable option are mutually exclusive.

    An error is returned if both of these options are specified on the tdload command line.

    • The -f (or --SourceFileName) option and the --SelectStmt option are mutually exclusive.

    An error is returned if both of these options are specified on the tdload command line.

    -h tdpId The name by which the Teradata Data Warehouse Appliance 2xxx is known to the network.

    If the option is not specified, the default host name will be used.

    Recommendation: Specify this option to make sure you are connecting to the correct system.

    -j jobVariablesFile The name of the job variables file.

    If you are not executing the tdload command in the directory where the job variables file is stored, jobVariablesFile must be a fully qualified filename.

    -p password The password of the specified Teradata user.

    If the option is not specified, tdload prompts you for a password.

    -S Saves the Teradata PT script generated by the command.

  • Chapter 1: Teradata PT Utility Commandstdload

    40 Teradata Parallel Transporter Reference

    -t tableName Required. The name of the target table.

    Note: If the target table resides in a database that is different from the default database of the specified Teradata user, you must also use the --TargetWorkingDatabase option.

    -u userName Required. The logon id of the Teradata user with access privileges to the target table.

    -v Option that displays the version number of tdload without running a job.

    Do not use with any other option. The option works only on UNIX and Windows platforms.

    -x Enables debugging.

    --FileInstances number The number of instances used to read the data file.

    The default value is 1.

    --help Displays help.

    --LoadInstances number The number of instances used to load data.

    The default value is 1.

    --SelectStmt “SELECT statement(s);”

    SELECT statement performs data selection from Teradata Database tables.

    Since the SELECT statement can have space/blank characters, the entire statement should be enclosed in double quotation marks (") when specified on the command line, as follows:

    tload --SelectStmt "sel * from src_tbl;" SELECT statement requests cannot:

    • Specify a USING modifier.

    • Access non-data tables, such as SELECT DATE or SELECT USER.

    • Be satisfied by one or two AMPs, such as a SELECT statement that accesses rows based on the primary index or unique secondary index of a table.

    • Contain BLOB (Binary Large Object) or CLOB (Character Large Object) data types.

    The --SelectStmt option and the -f (or --SourceFileName) option are mutually exclusive. An error is returned if both of these are define on the tdload command line.

    If both the --SelectStmt option and the -- SourceTable option are defined, the --SourceTable option is ignored and a warning message is returned to the console.

    --SourceAccountId accountId The account associated with the specified Teradata user.

    Syntax Element Description

  • Chapter 1: Teradata PT Utility Commandstdload

    Teradata Parallel Transporter Reference 41

    --SourceFileName fileName Required. The name of the flat file that contains the data to be loaded.

    • The --SourceFileName (or -f) option and the --SourceTable option are mutually exclusive.

    An error is returned if both of these options are specified on the tdload command line.

    • The --SourceFileName (or -f) option and the --SelectStmt option are mutually exclusive.

    An error is returned if both of these options are specified on the tdload command line.

    --SourceInstances number The number of instances used to extract data from Teradata.

    The default value is 1.

    --SourceMaxSessions number The maximum sessions to be used in extracting data from tables.

    The default value is 32.

    --SourceMinSessions number The minimum sessions to be used in extracting data from tables.

    The default value is 1.

    --SourceTable tableName The name of the source table.

    Note: If the source table resides in a database that is different from the default database of the specified Teradata user, you must also use the --SourceWorkingDatabase option.

    The option --SourceTable and the -f (or --SourceFileName) option are mutually exclusive. An error is returned if both of them are specified on the tdload command line.

    If both the --SourceTable option and the --SelectStmt