Anonymous
Not applicable
2009-10-12
07:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
292 Views