tFileInputMSDelimited multiline output question

One Star

tFileInputMSDelimited multiline output question

Hi There,
I have been working on TOS for a few weeks now and I have a question relating to parsing in a multiline CSV file and using the output to update one of our internal systems.
Our problem:
We receive a file back from a system into a folder that we parse, map some codes to a salesforce equivalent and then update salesforce.
The file is multi line in cases that there is a rejection reason (see attached) and multiline of positive responses if there is no rejection reason.
These lines are marked NP1 (status update lines) NP2 (rejection line) and I can get the schema definition all setup and working properly.
I have looked at the tFileInputMSDelimited component and and I can seem to parse the information in a multiline format. the problem lies in the scenario in the documentation is very simple and takes any multiline output and separates it into three seperate tLogRow components to output to the screen/log window.
I have searched online in the forums and suchlike and cannot find out a quick way to read both lines in, join them into one cohesive object that I can then map/upload via tMapRow component into Salesforce. I get two output rows in order 1 and 2 when creating connections off the component but I cannot work out how to join them back together to work with all the data as one object.
Has anyone had experience of this issue? I have attached some sample files of what we are working with to give you an idea of the data.
standard file:
ZHV|AAFD35MD2D|S0004001|X|SPRK|X|SPRK|20080225145751|FORMF|||TR06|
NP1|1000000000030|9|||||||||
ZPT|AAFD35MD2D|1||1|20080225145751|

Rejection file:
ZHV|AAFD60J0DG|S0004001|X|SPRK|X|SPRK|20080227145835|FORMF|||TR06|
NP1|1000000000030|2|||||||||
NP2|1|
ZPT|AAFD60J0DG|2||1|20080227145835|
Thanks
Michael
Community Manager

Re: tFileInputMSDelimited multiline output question

Hello Michael
From your files, I don't think tFileInputMSDelimited is exactly suitable for your request.
I get two output rows in order 1 and 2 when creating connections off the component but I cannot work out how to join them back together to work with all the data as one object.

You are not allowed to create a cycle flow in a job, so you need to output the two rows into two different temporary files first, then using two tFileInputDelimited components to read two temporary files and link them back to other component, like tMap, and do join, merge action.
From your standard file and reject file, what are your expected result? Can you load some screeshots of your job?
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tFileInputMSDelimited multiline output question

I have a similar question ... I understand that InputMS will allow you "look for" multiple record types at once, however you usually need to know the original parent/child relationships in order to transform the data effectively, and those relationships often can't be deduced with values in the data itself (e.g. most X12 transactions). 
Once the various record types are parsed into their separate hash tables, how can you join them downstream in a later subjob?