15.10 - GetEvent Queries - Parallel Transporter

Teradata Parallel Transporter Application Programming Interface

prodname
Parallel Transporter
vrm_release
15.10
category
Programming Reference
featnum
B035-2516-035K

GetEvent Queries

All events must be queried after the driver is initiated and before it terminates. Events queried before their data is available return TD_Unavailable. The following table lists events used with the Connection object’s GetEvent function to retrieve runtime statistics from the Load driver.

 

Table 13: Load Driver Events 

Event

Returned Value

TD_Evt_AcquisitionPhraseStat

One 4-byte unsigned integer for the acquisition phase elapsed time and three 8-byte double for the acquisition phase CPU time, for megabytes per second, and for megabytes per CPU second.

Query this event after the start of data loading.

The elapsed time is at the job level. The elapsed time may be slightly different between the instances. The main instance will have the most accurate elapsed time.

The CPU time, megabytes per second, and megabytes per CPU second are at the instance level.

TD_Evt_ApplicationPhaseStat

One 4-byte unsigned integer for the application phase elapsed time.

Query this event after ApplyRows.

The elapsed time is at the job level. The elapsed time may be slightly different between the instances. The main instance will have the most accurate elapsed time

TD_Evt_ApplyCount64

One 8-byte unsigned integer for the number of rows inserted into the DBS. Query this event after ApplyRows. For a multi-instance job, query this number only in the master instance. The master instance returns the total number of rows applied to the target table from all instances.

TD_Evt_CLIError

One 4byte integer for the CLIv2 error number and a 255‑byte character buffer for the CLIv2 error text. Query this event at any time.

TD_Evt_DBSError

One 4byte integer for the DBS error number and a 255character buffer for the Teradata Database error text. Query this event at any time.

TD_Evt_BufferLayout

Four 4byte unsigned integers corresponding to the maximum buffer size, the row header size, the row length size, and the buffer trailer size. Use this information to format the buffer required for block loading.

Note: These layout values will change depending on the user environment and may be defined differently in future releases. Always obtain these values from the event method before buffering data.

Query this event at any time.

TD_Evt_ConnectStatus

Three 4byte integers corresponding to the number of sessions requested, the number of sessions connected, and the number for any CLIv2 error number that occurred during the connect process. Query this event at any time.

TD_Evt_CPUTime

One 8byte double for the CPU time of the instance in seconds. Query this event at any time.

TD_Evt_OperVersion

A pointer to a character string containing the driver version. Query this event only after the driver has been initiated.

TD_Evt_RowCounts

Three 4byte unsigned integers corresponding to the number of rows received, sent, and applied. This event can be queried any time before EndAcquisition to get the current number of rows received. The rest of the data for this event is available after ApplyRows. If rows are being loaded using PutRow, the data for this event will not be available until enough rows have been loaded to fill one internal buffer or until the Checkpoint function has been called.

The rows‑applied count returned by this event does not take into consideration rows that are rejected by the database during the application phase. Query the TD_Evt_ApplyCount event to get the final count of rows that have been applied to the target table.

TD_Evt_RowCounts64

Three 8-byte unsigned integers corresponding to the number of rows received, sent, and applied. This event can be queried anytime before EndAcquisition to get the current number of rows received. The rest of the data for this event is available after ApplyRows.

If rows are being loaded using PutRow, the data for this event will not be available until enough rows have been loaded to fill one internal buffer or until the Checkpoint function has been called.

The rows-applied count returned by this event does not take into consideration rows that are rejected by the database during the application phase. Query the TD_Evt_ApplyCount event to get the final count of rows that have been applied to the target table.

TD_Evt_RowsCheckpointed

One 4byte unsigned integer corresponding to the total number of rows that have been received and checkpointed for the entire job. Query this event any time after initiating a Teradata PT database connection in a single-instance job. This event will return TD_Unavailable when queried in a job containing multiple instances; this event is invalid if multiple instances are used.

Note that the event data returned by this event can be used as a replacement for the checkpoint data that must be passed into the Restart method during a restart job. It is recommended to always save the checkpoint data from the last successful call to the CheckPoint method in a potential restart job. However, if the checkpoint data is not saved then the event data returned by this event can be passed into the Restart method instead. This alternate method of performing checkpoint/restarts will only work with single-instance jobs.

TD_Evt_RowsCheckpointed64

One 8-byte unsigned integer corresponding to the total number of rows that have been received and checkpointed for the entire job. Query this event anytime after initiating a Teradata PT API database connection in a single-instance job. This event will return TD_Unavailable when queried in a job containing multiple instances; this event is invalid if multiple instances are used.

Note that the event data returned by this event can be used as a replacement for the checkpoint data that must be passed into the Restart method during a restart job. It is recommended to always save the checkpoint data from the last successful call to the CheckPoint method in a potential restart job. However, if the checkpoint data is not saved, then the event data returned by this event can be passed into the Restart method instead. This alternate method of performing checkpoint/restarts will only work with single-instance jobs.

TD_Evt_ApplyCount

One 4byte unsigned integer for the number of rows inserted into the DBS. Query this event after ApplyRows.

For a multi-instance job, only query this number in the master instance.

The master instance returns the total number of rows applied to the target table from all instances.

TD_Evt_ErrorTable1

One 4byte unsigned integer for the number of rows in error table 1. Query this event after the first call to PutRow or PutBuffer.

TD_Evt_ErrorTable2

One 4byte unsigned integer for the number of rows in error table 2. Query this event after ApplyRows.

TD_Evt_ExitCode

One 2byte integer for the driver exit code. Query this event right before the driver terminates.

TD_Evt_SessionNodeID

A pointer to a character string containing the information about the SessionNodeID for all the job sessions.

Data in the SessionNodeID for every session contains the following information:

  • First 4 bytes will contain Teradata DBS session number.
  • Next 2 bytes will contain Session type.
  • Next 2 bytes will contain the unformatted node ID.
  • Next 4 bytes will contain length(n) of the formatted node-ID.
  • Next 'n' bytes will contain formatted node ID.
  • This event can be queried only after the operator has been initiated and before the operator has been terminated.

    TD_Evt_SessionThrougput

    A pointer to a character string containing the information about the SessionThroughput for all the job sessions.

    Data in the SessionThroughput for every session contains the following information:

  • First 4 bytes will contain Teradata DBS session number,.
  • Next 2 bytes will contain Session type.
  • Next 8 bytes will contain CLI average actual send throughput.
  • Next 8 bytes will contain CLI average actual receive throughput.
  • Next 8 bytes will contain CLI average overall send throughput.
  • Next 8 bytes will contain CLI average overall receive throughput.
  • This event can be queried only after the operator has been initiated and before the operator has been terminated

    TD_Evt_Version

    A pointer to a character string containing the Teradata PT version followed by a pointer to a character string containing the operator version. Query this event at any time. The Teradata PT version is available any time. The operator version is available only after the driver has been initiated.