Windows - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide - 17.20

Parallel Transporter
Release Number
June 2022
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

To execute the precompiled TPTAPI applications available in the \sample\runsamp directory:

  1. Open a Windows command prompt.
  2. Change your working directory to <TPTAPI install directory>\sample\runsamp.
  3. Run the executable that is available in this directory.

    For example, to run a 32-bit TPTAPI application built with VC 11.0, issue the following command at the Windows command prompt:

    runsamp_vc11_WIN_32.exe  tdpid   userid   password

The following are the steps for accessing Windows code samples:

  1. After you install Teradata PT API, you should see the following directory structure:
    \..\bin (contains .lib and .dll files for vc11)
      \inc (contains .h files)
         \blockloading (Shows how to load rows in buffer mode with the load driver)
         \checkpoint (Shows how checkpoint/restart works with the stream driver)
         \common (Contains shared files used by all samples)
         \generic (Shows how each driver works)
         \getbuffer (Shows how to export the driver's GetBuffer feature)
         \inc (Contains shared .h files used by all samples)
         \multiple (Shows how to use multiple drivers in the same application)
         \multi_node (Shows how to use the multi-node protocol)
         \threads (Shows how to write multi-threaded applications)
         \runsamp (Contains precompiled TPTAPI applications
         compatible for Windows platforms)
         \runsamp_vc11_WIN_64.exe (64 bit TPTAPI application built with VC11)
    The 64-bit .lib and .dll files will only be in the 64-bit Windows package.
  2. Become familiar with the Teradata PT methods in the sample programs (.cpp files).
  3. In each sample solution file, you can see the following settings.

    Build 64-bit samples in Visual Studio V11.

    • C/C++ Additional Include Directories:

    • Linker Additional Library Directories

      ..\..\..\..\bin\TELAPI.lib (samples(compiled with MSVCvc11))

      Edit the makefile and modify the values of the C++C and CC variables to the location of the compilers on your system.

  4. Put the sample executable, data file, and all Teradata PT API dlls in the same directory or specify the Teradata PT API directory in the PATH environment variable.

    For example, the following directories should be appended to the PATH environment variable if they are not already there:

    C:\Program Files\Teradata\Client\17.10\bin(for TPTAPI library(compiled with MSVCvc11)))
  5. Change the database system name, user name, and user password in the BTEQ scripts setupTables.bteq and cleanupTables.bteq for each sample.
  6. Run the BTEQ script setupTables.bteq to set up the tables for the current sample.
  7. Execute the sample.
  8. Run the BTEQ script cleanupTables.bteq to clean up the tables used by the current sample.