The Integration Service can pass a single row to a Custom transformation procedure or a block of rows in an array. You can write the procedure code to specify whether the procedure receives one row or a block of rows. You can increase performance when the procedure receives a block of rows:
You can decrease the number of function calls the Integration Service and procedure make. The Integration Service calls the input row notification function fewer times, and the procedure calls the output notification function fewer times.
You can increase the locality of memory access space for the data.
You can write the procedure code to perform an algorithm on a block of data instead of each row of data.
By default, the procedure receives a row of data at a time. To receive a block of rows, you must include the INFA_CTSetDataAccessMode() function to change the data access mode to array-based. When the data access mode is array-based, you must use the array-based data handling and row strategy functions to access and output the data. When the data access mode is row-based, you must use the row-based data handling and row strategy functions to access and output the data.
All array-based functions use the prefix INFA_CTA. All other functions use the prefix INFA_CT.
Use the following steps to write the procedure code to access a block of rows:
Call INFA_CTSetDataAccessMode() during the procedure initialization, to change the data access mode to array-based.
When you create a passive Custom transformation, you can also call INFA_CTSetPassThruPort() during procedure initialization to pass through the data for input/output ports.
When a block of data reaches the Custom transformation procedure, the Integration Service calls p_<proc_name>_inputRowNotification() for each block of data. Perform the rest of the steps inside this function.
Call INFA_CTAGetNumRows() using the input group handle in the input row notification function to find the number of rows in the current block.
Call one of the INFA_CTAGetData<datatype>() functions using the input port handle to get the data for a particular row in the block.
Call INFA_CTASetData to output rows in a block.
Before calling INFA_CTOutputNotification(), call INFA_CTASetNumRows() to notify the Integration Service of the number of rows the procedure is outputting in the block.