Five Stars

Talend Data Mapper looping

Hello, I don't know how to modify my map:

my input file :

H|R1602-0345|AN|20160219|WATER01|13480
D||1000|CD1602-1018|1000|NET0000043|ZETAG 9048FS|KG|200||

H|R1602-0346|AN|20160219|JOHNS|82164365
D||1000|CD1602-0946|7000|NET0000055|HYPOFOAM FUT 234kg|KG|468||

H|R1602-0347|AN|20160219|EXPRI|023530
D||1000|CD1602-0998|1000|ETI5061000|ETI LK TEA PECHE 20CL|UN|463200||
D||2000|CD1602-0998|2000|ETI5081007|ETI PAQ FRUIT'O tropical 4X20C|UN|463200||
D||3000|CD1602-0998|3000|ETI5081008|ETI PAQ FRUIT'O MULTI  4X 20CL|UN|480000||
D||4000|CD1601-0763|1000|ETI6061200|ETI LK LIMONADE 50CL|UN|270000||
D||5000|CD1601-0763|2000|ETI6061201|ETI LK COLA 50CL|UN|270000||
D||6000|CD1601-0763|3000|ETI6221201|ETI STB GAZEIFIEE JAPON 50CL|UN|243000||
D||7000|CD1601-0166|1000|ETI5051401|ETI TOP BUDGET ASEP MUTIVIT 1L|UN|172000||
D||8000|CD1601-0166|2000|ETI5081427|ETI PAQ ASEP MULTIVITAMIN 1L|UN|172000||
D||9000|CD1601-0166|3000|ETI5081433|ETI PAQ ASEP cranberry/framboi|UN|172000||
D||10000|CD1601-0166|6000|ETI5621400|ETI pur jus citron  Carthagino|UN|172000||
D||11000|CD1601-0166|7000|ETI5081436|ETI PAQ ASEP POIRE 1L|UN|150500||
D||12000|CD1601-0166|8000|ETI5081437|ETI PAQ ASEP PECHE 1L|UN|107500||
D||13000|CD1601-0166|9000|ETI5081438|ETI PAQ ASEP ABRICOT 1L|UN|150500||
D||14000|CD1601-0166|10000|ETI6061400|ETI LK Cola  1L soda ligne K3|UN|172000||
D||15000|CD1601-0532|1000|ETI6221500|ETI STB NATURE 1L25|UN|430000||
D||16000|CD1601-0532|1000|ETI6221500|ETI STB NATURE 1L25|UN|430000||
D||17000|CD1601-0532|1000|ETI6221500|ETI STB NATURE 1L25|UN|344000||
D||18000|CD1601-0532|2000|ETI6221501|ETI STB NATURE 1L25 G|UN|172000||
D||19000|CD1601-0532|3000|ETI6311500|ETI BEL FRAN  EAU GAZEIF 1L25|UN|172000||

And i want to produce a xml file which loop  on the header element  with the "command order" which is in the lines (line begin by D and Command order is in bold) and group in <lines> all the lines from this "command order"

map.pngexpression.png

Sorry for my poor english spoken

Thanks for your help

 

  • SDI
Tags (1)
2 REPLIES
Four Stars

Re: Talend Data Mapper looping

Hi,

 

Could you upload your map, a test input file and the XML expected file.

 

Eric

Five Stars

Re: Talend Data Mapper looping

I have uploaded the map files below :

A_0103_X3.zip

Thanks for your Help