This example shows how to parse a CSV file and load it into a Product Extension (PX) table named "Cars". The mapper <pfx:simple expression="Cars" out="name"/> sets the extension table name.
sku,label,price
1,BMW,10
2,AUDI,20
3,Skoda,10
4,Opel,20
5,Mercedes,10
6,Seat,20
7,Porsche,10
8,Peugeot,20
XML
<pfx:loadMapper id="carsMapper" convertEmptyStringToNull="true">
<pfx:simple expression="Cars" out="name"/>
<pfx:body in="sku"/>
<pfx:body in="label" out="attribute1"/>
<pfx:body in="price" out="attribute2"/>
</pfx:loadMapper>
.....
<route>
<from uri="file:{{import.ds.directory}}?{{archive.file}}&{{read.lock}}"/>
<split>
<tokenize token="
" group="5000"/>
<to uri="pfx-csv:unmarshal?header=sku,label,price&skipHeaderRecord=true"/>
<to uri="pfx-api:loaddata?mapper=carsMapper&objectType=PX"/>
</split>
</route>