17.00 - Transferring Data Using GetBuffer and PutBuffer functions (non-dynamic transfers) - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide

prodname
Parallel Transporter
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-2516-220K

Data exported using the Connection object’s GetBuffer function can be directly loaded using the Connection object’s PutBuffer function. This feature improves performance when data transfer is needed and no data transformation is required.

To directly transfer data from the Export driver’s GetBuffer function to the Load, Update, or Stream driver’s PutBuffer function, the Export driver’s buffer layout attributes must be set using the buffer layout values returned by the event method for the Load, Update, or Stream drivers. This causes the Export driver to format the data returned by the GetBuffer function so that it will match the buffer layout required by the Load, Update, or Stream driver’s PutBuffer function. The following steps describe how to accomplish this transfer.

  1. Create a Load, Update, or Stream driver and enable the PutBuffer feature by setting the TD_BUFFER_MODE attribute to Yes (or Y).
  2. Initiate the Load, Update or Stream driver.
  3. Create an Export driver and enable the GetBuffer feature by setting the TD_BUFFER_MODE attribute to Yes (or Y).
  4. Use the GetEvent function to query the TD_Evt_BufferLayout event for the Load, Update, or Stream driver and use the buffer layout values returned by this event to set the following attributes for the Export driver:
    • TD_BUFFER_MAX_SIZE
    • TD_BUFFER_HEADER_SIZE
    • TD_BUFFER_LENGTH_SIZE
    • TD_BUFFER_TRAILER_SIZE

After completing these steps, the Export driver can be initiated and the data retrieved by the Export driver’s GetBuffer function can be directly loaded using the Load, Update, or Stream driver’s PutBuffer function.

When using the Export driver’s dynamic feature and sharing the dynamic schema between drivers, the Export driver must be initiated first instead of last. In this situation, use the following alternative procedure.