Skip to Content
Former Member
Apr 08, 2009 at 05:43 PM

Key field from content - Sender file adapter content conversion


I am reading a source CSV file that has this structure. All rows in the source file are the same structure: line items of a PO. But there will be multiple POs in a single file, identified by the PO number as one column in the file.

PONum,LineItemNum,Qty,Description 001,1,34,Carrots 001,2,17,Apples 001,3,22,Bananas 002,1,4,Mangos 002,2,9,Coconuts 003,1,44,Grapes

Goal is to generate 3 messages, one for each PO:

<po> <num>001</num> <line_items> ... 3 line items for PO # 001 ... </line_items> </po> <po> <num>002</num> <line_items> ... 2 line items for PO # 002 ... </line_items> </po> <po> <num>003</num> <line_items> ... 1 line item for PO # 003 ... </line_items> </po>

Is there any way to use the Content Conversion Key Field Name to group the line items into the correct 3 messages? "Key Field Name" expects a static identifier for each type of row; but mine varies by the PO number in the content.

Or do I need to do this in the mapping? If so, what is the easiest way to split 1 large message of all line items into multiple target messages based on the PO number? (I assume this is better than sending individual line item messages and aggregating them later, as long as the file size is OK.)

Thanks in advance!


Edited by: Robert Burfoot-Lobo on Apr 8, 2009 11:43 AM