I use the last version of Talend 5.3.1.

I have a tmssqlInput which query my database like :

SELECT IdInvoice, DateInvoice, IdStuff, Name FROM Invoice
INNER JOIN Stuff ON Invoice.IdInvoice = Stuff.IdInvoice

which result in something like this

IdInvoice    | DateInvoice | IdStuff    | Name
1            | 2013-01-01  | 10         | test
1            | 2013-01-01  | 11         | test2
2            | 2013-02-01  | 12         | test3
2            | 2013-02-01  | 13         | test4

I'd like to export one file per invoice, here the specifications : one header line with IdInvoice;DateInvoice then one line per stuff like IdStuff;Name

example file 1:

1;2013-01-01
10;test
11;test2

example file 2 :

2;2013-02-01
12;test3
13;test4

how can I resolve that case with talend ? Probably in tFileOutputDelimited but how can I have one file with multiple informations and iterate over each IdInvoice

有帮助吗?

解决方案

Please go through the following link, you will get clear idea how to split data into multiple files http://www.talendfreelancer.com/2013/09/talend-tflowtoiterate.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top