cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple keyFieldValue in Sender File Adapter

Former Member
0 Kudos

Hello All,

Have a situation, with reading 2 files a debit and credit file which have the same file structure, But different file names, Example Credit is prefixed with C.txt and Debit is prefixed with D.txt.. I am able read both the files with configuring one communication channel, using advanced Selection for source file.

The structure of the debit file will look something like below

<Header>
 *<identifier>1</identifier>* 
  <description>Returned Items</description> 
  </Header>
 <Details>
  *<identifier>3</identifier>* 
  <returnDate>19-07-2010</returnDate> 
  </Details>
   <Details>
  *<identifier>3</identifier>* 
  <returnDate>19-07-2010</returnDate> 
  </Details>
 <Total>
  *<identifier>9</identifier>* 
  <itemCount>000000002</itemCount> 
  </Total>

The structure of the credit file will look something like below

<Header>
  *<identifier>1</identifier>* 
  <description>Returned Items</description> 
  </Header>
 <Details>
  *<identifier>2</identifier>* 
  <returnDate>19-07-2010</returnDate> 
  </Details>
   <Details>
  *<identifier>2</identifier>* 
  <returnDate>19-07-2010</returnDate> 
  </Details>
 <Total>
  *<identifier>9</identifier>* 
  <itemCount>000000002</itemCount> 
  </Total>

I am using the identifier field as the keyFieldValue its value will be '2' in case of the credit file and '3' in case of the debit file.

Even if 2 keyFieldValues for 2 and 3 are passed as parameters to the Details records, the adapter reads only details records of 3 as it is declared first in sequence.

I do not want to create 2 communication channels for just for a different keyFieldValue. Can anyone propose any suggestions.

--Prashanth

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190313
Active Participant
0 Kudos

Hi prashanth,

Your description is little confusing . Can you please elaborate more on your problem.

I think you do not require to craete two communication channels.

Regards,

Sheetal

Former Member
0 Kudos

Hi Sheetal,

have declared the content conversion as below

Details.keyFieldValue = 3
Details.keyFieldValue = 2

On starting the channel with the 2 files on the directory, the adapater reads the debit file correctly but in case of the credit records, it is not reading the Details structure. I get only the Header and Total Structure for the Credit record.

--Prashanth