Use the following process guidelines for implementing the Initiate, Execute, and Terminate functions for a filter operator.
Designing a Filter OperatorFunction |
Process |
Initiate |
None. |
Execute |
- Use the Get Table Schema List function to get the input data schema handle.
- Use the Get Row function to read a row.
- Use the Get Column Schema function to get the column handles associated with the input data schema.
- Do the following for each of the column handles involved in the filter task:
- Use the Get Column Value function to get the column value.
- Compare the column value with the filter value.
- If all column values satisfy the filter criteria, return PXSTC_EndMethod status, otherwise return PXSTC_DiscardRow status.
|
Terminate |
None. |
Example - Sample Filter Operator
On Windows, see the following text file in the Teradata Parallel Transporter installation folder for a sample filter operator: TPT_install_directory\sdk\src\samplefilter.cpp.