macOS - 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 \sample\runsamp directory:
  1. Change your working directory to <TPTAPI install directory>\sample\runsamp.
  2. Run the executable that is available in this directory.

    For example, to run a 64-bit TPTAPI application built on macOS, issue the following command at the prompt:

      ./runsamp_macos_64 tdpid userid password
  1. After you install Teradata PT, you should see the following directory structure:
      \lib          (contains 64-bit .dylib files)
      \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)
      \runsamp_macos_64   (64-bit TPTAPI application built for OS X with gcc 4.2)
  2. Become familiar with the Teradata PT methods in the sample programs (.cpp files).
  3. In the sample makefile, you can see the following settings. Run the makefile to build the samples.
    • C/C++ Additional Include Directories:
      ../inc    (Teradata PT common headers)
      ./inc     (sample-only header)
      ../common (sample shared files)
    • Linker Additional Library Directories: -ltelapi
    Edit the makefile and modify the values of the C++C and CC variables to point to the location of the respective compilers on your system.
  4. Set the CLIv2 environment variable THREADONOFF to 1 (one) to run the Teradata PT multi-threaded application.
  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 application that is completed in step 3.
  8. Run the BTEQ script cleanupTables.bteq to clean up the tables used by the current sample.