Teradata Parallel Transporter Application Programming Interface Programmer Guide
Total Page:16
File Type:pdf, Size:1020Kb
Teradata Parallel Transporter Application Programming Interface Programmer Guide Release 13.10 B035-2516-020A February 2010 The product or products described in this book are licensed products of Teradata Corporation or its affiliates. Teradata, BYNET, DBC/1012, DecisionCast, DecisionFlow, DecisionPoint, Eye logo design, InfoWise, Meta Warehouse, MyCommerce, SeeChain, SeeCommerce, SeeRisk, Teradata Decision Experts, Teradata Source Experts, WebAnalyst, and You’ve Never Seen Your Business Like This Before are trademarks or registered trademarks of Teradata Corporation or its affiliates. Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc. AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc. BakBone and NetVault are trademarks or registered trademarks of BakBone Software, Inc. EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation. GoldenGate is a trademark of GoldenGate Software, Inc. 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 and Engenio are registered trademarks 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. Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries. 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. Sun Microsystems, Solaris, Sun, and Sun Java are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries. 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 collective membership mark and a service mark of Unicode, Inc. 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 e-mail: [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 © 2005 - 2010 by Teradata Corporation. All Rights Reserved. Preface Purpose This book provides information about Teradata Parallel Transporter Application Programming Interface, a Teradata® Tools and Utilities product. Teradata Tools and Utilities is a group of products designed to work with Teradata Database. Teradata Parallel Transporter Application Programming Interface is a set of application programming interfaces used to load into, and export data from, the Teradata Database. This book describes how to set up the interface, error reporting, checkpoint and restart, and other relevant topics and includes coding examples. Audience This book is intended for use by: • Database administrators • Relational database developers • Field engineers • Test engineers Supported Releases This book supports the following releases: • Teradata Database V2R6.x, V12.0, V13.0, V13.10 • Teradata Tools and Utilities 13.10 • Teradata Parallel Transporter Application Programming Interface 13.10 • Teradata PT ICU Librar y Note: To verify the Teradata Parallel Transporter Application Programming Interface driver version number review these events: For the Load driver, see “TD_Evt_Version” on page 72 and “TD_TRACE_LEVEL” on page 69. For the Update driver, see “TD_Evt_Version” on page 90 and “TD_TRACE_LEVEL” on page 87. For the Stream driver, see “TD_Evt_Version” on page 117 and “TD_TRACE_LEVEL” on page 113. Teradata Parallel Transporter Application Programming Interface Programmer Guide 3 Preface Prerequisites For the Export driver, see “TD_Evt_Version” on page 136 and “TD_TRACE_LEVEL” on page 135. The Teradata Tools and Utilities 13.10 version of the following products are required for Teradata Parallel Transporter Application Programming Interface: • Teradata International Components for Unicode (Teradata ICU) • Teradata Generic Security Services (TeraGSS) • Teradata Call Level Interface, Version 2 (Teradata CLI V2) • Teradata Parallel Transporter Operator Support Library • Teradata Parallel Transporter Export Operator (if used) • Teradata Parallel Transporter Load Operator (if used) • Teradata Parallel Transporter Update Operator (if used) • Teradata Parallel Transporter Stream Operator (if used) See Appendix A: “Platform Compilers” for the supported versions and releases of the platform compilers. 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. 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 • Teradata Database • Relational database management systems • Connectivity software, such as ODBC • Microsoft® Windows® 2000, Windows XP®, Solaris SPARC®, Solaris Opteron®, IBM AIX®, LINUX ®, HP-UX®, and IBM z/OS operating systems • Utilities that load and export data 4 Teradata Parallel Transporter Application Programming Interface Programmer Guide Preface Changes to This Book Changes to This Book The following changes were made to this book in support of the current release. Changes are marked with change bars. For a complete list of changes to the product, see the Teradata Tools and Utilities Release Definition associated with this release. Date and Release Description February 2010 • Support for Red Hat Linux Advanced Server 2.1 platform compilers is 13.10 discontinued (was listed in appendix A) • Support for library built with gcc 2.96 (32-bit TPT API on Linux) is discontinued. • z/Linux support has been added. • Appendix A has been updated with additional Windows 32-bit compiler versions. • Appendix A has been updated with information on z/Linux compiler • The Stream driver now supports the following optional attributes: TD_DROPMACRO specifies whether to keep or drop the macro created during the current Stream job. TD_PACKMAXIMUM triggers the Stream driver to dynamically determine the maximum possible pack factor for the current Stream job. A new GetEvent query has been added to the Stream driver. TD_Evt_ PackFactor is a pointer to the value of the pack factor as an integer. • The Export driver now supports the following optional attributes: TD_OUTLIMIT limits the number of rows that the Export driver exports. TD_SPOOLMODE specifies whether to use spool or not while running the current export job. • For Load and Update drivers, the TD_Evt_ApplyCount GetEvent query for multi-instance jobs only queries the number in the master job instance. The master instance returns the total number of rows applied to the target table from all instances. Teradata Parallel Transporter Application Programming Interface Programmer Guide 5 Preface