pfx-sql:selectIterator

Used in the select batch mode.

Properties

No properties.

Examples

Below is an example of route which uses select in the batch mode together with selectIterator. Note that you have to specify a correct ORDER BY clause when using the batch mode. This ORDER BY has to provide clear deterministic ordering of each loaded row, otherwise there could be unexpected problems with rows mixing.

<route id="loadOrderReasonToIpt"> <from uri="direct:loadOrderReasonToIpt"/> <log loggingLevel="INFO" message="Going to load ORDER_REASON data to IPT" logName="pig.orderReasonIPTLoad" /> <to uri="pfx-sql:select?sql=select * from V_ORDER_REASON ORDER BY key1,key2&amp;batchMode=true&amp;batchSize=5000&amp;dialect=POSTGRESQL"/> <split stopOnException="true" parallelProcessing="false" streaming="true"> <simple>${body}</simple> <to uri="pfx-sql:selectIterator"/> <log message="Found ${body.size()} entries" loggingLevel="INFO" logName="pig.orderReasonIPTLoad"/> <to uri="pfx-api:loaddata?mapper=orderReasonToPPMapper&amp;objectType=MLTV2&amp;pricingParameterName=GLOBAL.OrderReasonFlag"/> <log message="Loaded ${property[CamelSplitIndex]}. batch of ORDER REASON data to IPT" loggingLevel="INFO" logName="pig.orderReasonIPTLoad"/> </split> <log message="All ORDER REASON data loaded to IPT" loggingLevel="INFO" logName="pig.orderReasonIPTLoad"/> </route>

 

IntegrationManager version 5.8.0