Get Row - Parallel Transporter

Teradata Parallel Transporter Operator Programmer Guide

Product
Parallel Transporter
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2018-10-10
dita:mapPath
vxb1527114222350.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2435
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

Get Row is the service function that retrieves a data row.

Structure

#include <pxoper.h>
PXSTC_Code PX_GetRow(PX_TableSchemaHandle  tableSchemaHandle,
   PX_Count *  columnCount,
   PX_Indicator **  nullIndicator,
   PX_ByteOffset **  offsets,
   PX_Length **  lengths,
   PX_Addr *  rowAddr,
   PX_Length *  rowLength);

where the following is true:

Parameter Function Specification
columnCount output Pointer to the number of columns associated with the data row.
lengths output Pointer to the array of integers representing the length of the corresponding column value.
nullIndicator output Pointer to the array of indicator bytes specifying whether or not the corresponding column value is NULL.
offsets output Pointer to the array of integers representing the corresponding column positions in terms of the number of bytes into the data row.
rowAddr output Pointer to the address of the data row.
rowLength output Pointer to the length of the data row.
tableSchemaHandle input Table schema handle by which the data row is to be obtained.

Return Codes

The following Get Row function status codes are defined by the Teradata PT operator interface.

Status Code Signifies
PXSTC_BadHandle An undefined data schema handle.
PXSTC_Success Successful retrieval of the data row.
PXSTC_EndOfData End of data.

Usage Notes

Consider the following when defining the Get Row function.

Topic Usage Notes
Return Data Format Data rows returned by the Get Row function are always prefixed with NULL indicator bytes.
Status If the function status is PXSTC_Success:
  • The rowAddr parameter stores the address of the data row.
  • The rowLength parameter stores the length of the data row.
  • The columnCount parameter stores the number of columns associated with the data row.
  • The nullIndicators parameter is the address of the array indicating whether or not the column values are NULL.
  • The offsets parameter is the address of the array that indicates the byte offsets into the data row.
  • The lengths parameter is the address of the array that indicates the lengths of the column values.
See Also