Fetch Data from Pricefx

The batched mode is used to fetch huge amount of data from Pricefx. You should use it when you need to download more data than the Java memory can handle. You can define the batchSize.

<filter id="pxCarsFilter"> <and> <criterion fieldName="name" operator="equals" value="Cars"/> </and> </filter> ..... <route> <from uri="timer://fetchData?repeatCount=1"/> <to uri="pfx-api:fetch?filter=pxCarsFilter&objectType=PX&batchedMode=true&batchSize=5000"/> <split> <simple>${body}</simple> <to uri="pfx-api:fetch?filter=pxCarsFilter&objectType=PX"/> <log message="${body}"/> </split> </route>

 

The same example but with a SQL-like query:

<route> <from uri="timer://fetchData?repeatCount=1"/> <to uri="pfx-api:fetch?sql=select sku,name,attribute2 where name='Cars'&objectType=PX&batchedMode=true&batchSize=5000"/> <split> <simple>${body}</simple> <to uri="pfx-api:fetch?sql=select sku,name,attribute2 where name='Cars'&objectType=PX"/> <log message="${body}"/> </split> </route>

IntegrationManager version 5.8.0